Class DefaultAuthorizationChecker
java.lang.Object
org.pac4j.core.authorization.checker.DefaultAuthorizationChecker
- All Implemented Interfaces:
AuthorizationChecker
Default way to check the authorizations (with default authorizers).
- Since:
- 1.8.0
- Author:
- Jerome Leleu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final CsrfAuthorizerprotected static final IsAnonymousAuthorizerprotected static final IsAuthenticatedAuthorizerprotected static final IsFullyAuthenticatedAuthorizerprotected static final IsRememberedAuthorizer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<Authorizer>computeAuthorizers(WebContext context, List<UserProfile> profiles, String authorizersValue, Map<String, Authorizer> authorizersMap, List<Client> clients) protected List<Authorizer>computeAuthorizersFromNames(String authorizerNames, Map<String, Authorizer> authorizersMap) protected List<Authorizer>computeDefaultAuthorizers(WebContext context, List<UserProfile> profiles, List<Client> clients, Map<String, Authorizer> authorizersMap) protected booleancontainsClientType(List<Client> clients, Class<? extends Client> clazz) booleanisAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles, String authorizersValue, Map<String, Authorizer> authorizersMap, List<Client> clients) Check whether the user is authorized.protected booleanisAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles, List<Authorizer> authorizers) protected AuthorizerretrieveAuthorizer(String authorizerName, Map<String, Authorizer> authorizersMap)
-
Field Details
-
CSRF_AUTHORIZER
-
IS_ANONYMOUS_AUTHORIZER
-
IS_AUTHENTICATED_AUTHORIZER
-
IS_FULLY_AUTHENTICATED_AUTHORIZER
-
IS_REMEMBERED_AUTHORIZER
-
-
Constructor Details
-
DefaultAuthorizationChecker
public DefaultAuthorizationChecker()
-
-
Method Details
-
isAuthorized
public boolean isAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles, String authorizersValue, Map<String, Authorizer> authorizersMap, List<Client> clients) Description copied from interface:AuthorizationCheckerCheck whether the user is authorized.- Specified by:
isAuthorizedin interfaceAuthorizationChecker- Parameters:
context- the web contextsessionStore- the session storeprofiles- the profileauthorizersValue- the authorizersauthorizersMap- the map of authorizersclients- the clients- Returns:
- whether the user is authorized.
-
computeAuthorizers
protected List<Authorizer> computeAuthorizers(WebContext context, List<UserProfile> profiles, String authorizersValue, Map<String, Authorizer> authorizersMap, List<Client> clients) -
computeDefaultAuthorizers
protected List<Authorizer> computeDefaultAuthorizers(WebContext context, List<UserProfile> profiles, List<Client> clients, Map<String, Authorizer> authorizersMap) -
computeAuthorizersFromNames
protected List<Authorizer> computeAuthorizersFromNames(String authorizerNames, Map<String, Authorizer> authorizersMap) -
retrieveAuthorizer
protected Authorizer retrieveAuthorizer(String authorizerName, Map<String, Authorizer> authorizersMap) -
containsClientType
-
isAuthorized
protected boolean isAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles, List<Authorizer> authorizers)
-