Class CsrfAuthorizer
java.lang.Object
org.pac4j.core.authorization.authorizer.CsrfAuthorizer
- All Implemented Interfaces:
Authorizer
Authorizer that checks CSRF tokens.
- Since:
- 1.8.0
- Author:
- Jerome Leleu
-
Constructor Summary
ConstructorsConstructorDescriptionCsrfAuthorizer(String parameterName, String headerName) CsrfAuthorizer(String parameterName, String headerName, boolean checkAllRequests) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhashEquals(String a, String b) booleanisAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles) Checks if the user profiles and / or the current web context are authorized.booleanvoidsetCheckAllRequests(boolean checkAllRequests) voidsetHeaderName(String headerName) voidsetParameterName(String parameterName) toString()
-
Constructor Details
-
CsrfAuthorizer
public CsrfAuthorizer() -
CsrfAuthorizer
-
CsrfAuthorizer
-
-
Method Details
-
isAuthorized
public boolean isAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles) Description copied from interface:AuthorizerChecks if the user profiles and / or the current web context are authorized.- Specified by:
isAuthorizedin interfaceAuthorizer- Parameters:
context- the web contextsessionStore- the session storeprofiles- the user profiles- Returns:
- if the access is authorized
-
hashEquals
-
getParameterName
-
setParameterName
-
getHeaderName
-
setHeaderName
-
isCheckAllRequests
public boolean isCheckAllRequests() -
setCheckAllRequests
public void setCheckAllRequests(boolean checkAllRequests) -
toString
-