Class IsAuthenticatedAuthorizer
- java.lang.Object
-
- org.pac4j.core.authorization.authorizer.ProfileAuthorizer
-
- org.pac4j.core.authorization.authorizer.AbstractCheckAuthenticationAuthorizer
-
- org.pac4j.core.authorization.authorizer.IsAuthenticatedAuthorizer
-
- All Implemented Interfaces:
Authorizer
public class IsAuthenticatedAuthorizer extends AbstractCheckAuthenticationAuthorizer
The user must be authenticated. This authorizer should never be necessary unless using theAnonymousClient
.- Since:
- 1.9.0
- Author:
- Jerome Leleu
-
-
Constructor Summary
Constructors Constructor Description IsAuthenticatedAuthorizer()
IsAuthenticatedAuthorizer(java.lang.String redirectionUrl)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IsAuthenticatedAuthorizer
isAuthenticated()
boolean
isAuthorized(WebContext context, SessionStore sessionStore, java.util.List<UserProfile> profiles)
Checks if the user profiles and / or the current web context are authorized.boolean
isProfileAuthorized(WebContext context, SessionStore sessionStore, UserProfile profile)
Whether a specific profile is authorized.-
Methods inherited from class org.pac4j.core.authorization.authorizer.AbstractCheckAuthenticationAuthorizer
getRedirectionUrl, handleError, setRedirectionUrl, toString
-
Methods inherited from class org.pac4j.core.authorization.authorizer.ProfileAuthorizer
isAllAuthorized, isAnyAuthorized
-
-
-
-
Method Detail
-
isAuthorized
public boolean isAuthorized(WebContext context, SessionStore sessionStore, java.util.List<UserProfile> profiles)
Description copied from interface:Authorizer
Checks if the user profiles and / or the current web context are authorized.- Parameters:
context
- the web contextsessionStore
- the session storeprofiles
- the user profiles- Returns:
- if the access is authorized
-
isProfileAuthorized
public boolean isProfileAuthorized(WebContext context, SessionStore sessionStore, UserProfile profile)
Description copied from class:ProfileAuthorizer
Whether a specific profile is authorized.- Specified by:
isProfileAuthorized
in classProfileAuthorizer
- Parameters:
context
- the web contextsessionStore
- the session storeprofile
- the user profile- Returns:
- whether a specific profile is authorized
-
isAuthenticated
public static IsAuthenticatedAuthorizer isAuthenticated()
-
-