Class DefaultAuthorizationChecker

  • All Implemented Interfaces:
    AuthorizationChecker

    public class DefaultAuthorizationChecker
    extends java.lang.Object
    implements AuthorizationChecker
    Default way to check the authorizations (with default authorizers).
    Since:
    1.8.0
    Author:
    Jerome Leleu
    • Constructor Detail

      • DefaultAuthorizationChecker

        public DefaultAuthorizationChecker()
    • Method Detail

      • isAuthorized

        public boolean isAuthorized​(WebContext context,
                                    SessionStore sessionStore,
                                    java.util.List<UserProfile> profiles,
                                    java.lang.String authorizersValue,
                                    java.util.Map<java.lang.String,​Authorizer> authorizersMap,
                                    java.util.List<Client> clients)
        Description copied from interface: AuthorizationChecker
        Check whether the user is authorized.
        Specified by:
        isAuthorized in interface AuthorizationChecker
        Parameters:
        context - the web context
        sessionStore - the session store
        profiles - the profile
        authorizersValue - the authorizers
        authorizersMap - the map of authorizers
        clients - the clients
        Returns:
        whether the user is authorized.
      • computeAuthorizers

        protected java.util.List<Authorizer> computeAuthorizers​(WebContext context,
                                                                java.util.List<UserProfile> profiles,
                                                                java.lang.String authorizersValue,
                                                                java.util.Map<java.lang.String,​Authorizer> authorizersMap,
                                                                java.util.List<Client> clients)
      • computeDefaultAuthorizers

        protected java.util.List<Authorizer> computeDefaultAuthorizers​(WebContext context,
                                                                       java.util.List<UserProfile> profiles,
                                                                       java.util.List<Client> clients,
                                                                       java.util.Map<java.lang.String,​Authorizer> authorizersMap)
      • computeAuthorizersFromNames

        protected java.util.List<Authorizer> computeAuthorizersFromNames​(java.lang.String authorizerNames,
                                                                         java.util.Map<java.lang.String,​Authorizer> authorizersMap)
      • retrieveAuthorizer

        protected Authorizer retrieveAuthorizer​(java.lang.String authorizerName,
                                                java.util.Map<java.lang.String,​Authorizer> authorizersMap)
      • containsClientType

        protected boolean containsClientType​(java.util.List<Client> clients,
                                             java.lang.Class<? extends Client> clazz)