Class RequireAllRolesAuthorizer
java.lang.Object
org.pac4j.core.authorization.authorizer.ProfileAuthorizer
org.pac4j.core.authorization.authorizer.AbstractRequireElementAuthorizer<E>
org.pac4j.core.authorization.authorizer.AbstractRequireAllAuthorizer<String>
org.pac4j.core.authorization.authorizer.RequireAllRolesAuthorizer
- All Implemented Interfaces:
Authorizer
Checks an access if the user profile has all the roles.
- Since:
- 1.8.0
- Author:
- Jerome Leleu
-
Field Summary
Fields inherited from class org.pac4j.core.authorization.authorizer.AbstractRequireElementAuthorizer
elements -
Constructor Summary
ConstructorsConstructorDescriptionRequireAllRolesAuthorizer(String... roles) RequireAllRolesAuthorizer(List<String> roles) RequireAllRolesAuthorizer(Set<String> roles) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheck(WebContext context, SessionStore sessionStore, UserProfile profile, String element) Check a specific element.static RequireAllRolesAuthorizerrequireAllRoles(String... roles) static RequireAllRolesAuthorizerrequireAllRoles(List<String> roles) static RequireAllRolesAuthorizerrequireAllRoles(Set<String> roles) Methods inherited from class org.pac4j.core.authorization.authorizer.AbstractRequireAllAuthorizer
isProfileAuthorized, toStringMethods inherited from class org.pac4j.core.authorization.authorizer.AbstractRequireElementAuthorizer
getElements, isAuthorized, setElements, setElements, setElementsMethods inherited from class org.pac4j.core.authorization.authorizer.ProfileAuthorizer
handleError, isAllAuthorized, isAnyAuthorized
-
Constructor Details
-
RequireAllRolesAuthorizer
public RequireAllRolesAuthorizer() -
RequireAllRolesAuthorizer
-
RequireAllRolesAuthorizer
-
RequireAllRolesAuthorizer
-
-
Method Details
-
check
protected boolean check(WebContext context, SessionStore sessionStore, UserProfile profile, String element) Description copied from class:AbstractRequireElementAuthorizerCheck a specific element.- Specified by:
checkin classAbstractRequireElementAuthorizer<String>- Parameters:
context- the web contextsessionStore- the session storeprofile- the profileelement- the element to check- Returns:
- whether it is authorized for this element
-
requireAllRoles
-
requireAllRoles
-
requireAllRoles
-