Class ProfileAuthorizer

    • Constructor Detail

      • ProfileAuthorizer

        public ProfileAuthorizer()
    • Method Detail

      • isAllAuthorized

        public boolean isAllAuthorized​(WebContext context,
                                       SessionStore sessionStore,
                                       java.util.List<UserProfile> profiles)
        If all profiles are authorized.
        Parameters:
        context - the web context
        sessionStore - the session store
        profiles - the user profiles
        Returns:
        whether all profiles are authorized
      • isAnyAuthorized

        public boolean isAnyAuthorized​(WebContext context,
                                       SessionStore sessionStore,
                                       java.util.List<UserProfile> profiles)
        If any of the profiles is authorized.
        Parameters:
        context - the web context
        sessionStore - the session store
        profiles - the user profiles
        Returns:
        whether any of the profiles is authorized
      • isProfileAuthorized

        protected abstract boolean isProfileAuthorized​(WebContext context,
                                                       SessionStore sessionStore,
                                                       UserProfile profile)
        Whether a specific profile is authorized.
        Parameters:
        context - the web context
        sessionStore - the session store
        profile - the user profile
        Returns:
        whether a specific profile is authorized
      • handleError

        protected boolean handleError​(WebContext context,
                                      SessionStore sessionStore)
        Handle the error.
        Parameters:
        context - the web context
        sessionStore - the session store
        Returns:
        false