Class AbstractRequireElementAuthorizer<E>
java.lang.Object
org.pac4j.core.authorization.authorizer.ProfileAuthorizer
org.pac4j.core.authorization.authorizer.AbstractRequireElementAuthorizer<E>
- All Implemented Interfaces:
Authorizer
- Direct Known Subclasses:
AbstractRequireAllAuthorizer,AbstractRequireAnyAuthorizer
An authorizer to require elements.
- Since:
- 1.8.1
- Author:
- Jerome Leleu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancheck(WebContext context, SessionStore sessionStore, UserProfile profile, E element) Check a specific element.booleanisAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles) Checks if the user profiles and / or the current web context are authorized.voidsetElements(E... elements) voidsetElements(List<E> elements) voidsetElements(Set<E> elements) Methods inherited from class org.pac4j.core.authorization.authorizer.ProfileAuthorizer
handleError, isAllAuthorized, isAnyAuthorized, isProfileAuthorized
-
Field Details
-
elements
-
-
Constructor Details
-
AbstractRequireElementAuthorizer
public AbstractRequireElementAuthorizer()
-
-
Method Details
-
isAuthorized
public boolean isAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles) Description copied from interface:AuthorizerChecks if the user profiles and / or the current web context are authorized.- Parameters:
context- the web contextsessionStore- the session storeprofiles- the user profiles- Returns:
- if the access is authorized
-
check
protected abstract boolean check(WebContext context, SessionStore sessionStore, UserProfile profile, E element) Check a specific element.- Parameters:
context- the web contextsessionStore- the session storeprofile- the profileelement- the element to check- Returns:
- whether it is authorized for this element
-
getElements
-
setElements
-
setElements
-
setElements
-