Class RequireAnyAttributeAuthorizer
java.lang.Object
org.pac4j.core.authorization.authorizer.ProfileAuthorizer
org.pac4j.core.authorization.authorizer.AbstractRequireElementAuthorizer<E>
org.pac4j.core.authorization.authorizer.AbstractRequireAnyAuthorizer<String>
org.pac4j.core.authorization.authorizer.RequireAnyAttributeAuthorizer
- All Implemented Interfaces:
Authorizer
This is
RequireAnyAttributeAuthorizer
which checks profile
attributes for the specified element, and optionally
may pattern-check the configured value. In practice, you may
use this authorizer to see if the profile contains attribute X
and optionally, whether X has a value that matches pattern Y.- Since:
- 1.9.2
- Author:
- Misagh Moayyed
-
Field Summary
Fields inherited from class org.pac4j.core.authorization.authorizer.AbstractRequireElementAuthorizer
elements
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
check
(WebContext context, SessionStore sessionStore, UserProfile profile, String element) Check a specific element.requireAnyAttribute
(String valueToMatch) Methods inherited from class org.pac4j.core.authorization.authorizer.AbstractRequireAnyAuthorizer
isProfileAuthorized
Methods inherited from class org.pac4j.core.authorization.authorizer.AbstractRequireElementAuthorizer
getElements, isAuthorized, setElements, setElements, setElements
Methods inherited from class org.pac4j.core.authorization.authorizer.ProfileAuthorizer
handleError, isAllAuthorized, isAnyAuthorized
-
Constructor Details
-
RequireAnyAttributeAuthorizer
public RequireAnyAttributeAuthorizer() -
RequireAnyAttributeAuthorizer
-
-
Method Details
-
check
protected boolean check(WebContext context, SessionStore sessionStore, UserProfile profile, String element) Description copied from class:AbstractRequireElementAuthorizer
Check a specific element.- Specified by:
check
in classAbstractRequireElementAuthorizer<String>
- Parameters:
context
- the web contextsessionStore
- the session storeprofile
- the profileelement
- the element to check- Returns:
- whether it is authorized for this element
-
requireAnyAttribute
-