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
Modifier and TypeFieldDescriptionprotected static final CsrfAuthorizer
protected static final IsAnonymousAuthorizer
protected static final IsAuthenticatedAuthorizer
protected static final IsFullyAuthenticatedAuthorizer
protected static final IsRememberedAuthorizer
-
Constructor Summary
-
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 boolean
containsClientType
(List<Client> clients, Class<? extends Client> clazz) boolean
isAuthorized
(WebContext context, SessionStore sessionStore, List<UserProfile> profiles, String authorizersValue, Map<String, Authorizer> authorizersMap, List<Client> clients) Check whether the user is authorized.protected boolean
isAuthorized
(WebContext context, SessionStore sessionStore, List<UserProfile> profiles, List<Authorizer> authorizers) protected Authorizer
retrieveAuthorizer
(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:AuthorizationChecker
Check whether the user is authorized.- Specified by:
isAuthorized
in 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)
-