Package no.polaric.core.auth
Class UserAuthorizer
java.lang.Object
no.polaric.core.auth.UserAuthorizer
- All Implemented Interfaces:
org.pac4j.core.authorization.authorizer.Authorizer
public class UserAuthorizer
extends Object
implements org.pac4j.core.authorization.authorizer.Authorizer
Authorizer for users. Instantiated with an authorization level (0=login, 1=operator, 2=admin).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isAuthorized
(org.pac4j.core.context.WebContext ctx, org.pac4j.core.context.session.SessionStore ss, List<org.pac4j.core.profile.UserProfile> profile) Authorize if user has been assigned the specified level.toString()
-
Constructor Details
-
UserAuthorizer
public UserAuthorizer() -
UserAuthorizer
public UserAuthorizer(int lvl)
-
-
Method Details
-
isAuthorized
public boolean isAuthorized(org.pac4j.core.context.WebContext ctx, org.pac4j.core.context.session.SessionStore ss, List<org.pac4j.core.profile.UserProfile> profile) Authorize if user has been assigned the specified level.- Specified by:
isAuthorized
in interfaceorg.pac4j.core.authorization.authorizer.Authorizer
-
toString
-