Class WebExpressionAuthorizationManager
java.lang.Object
org.springframework.security.web.access.expression.WebExpressionAuthorizationManager
- All Implemented Interfaces:
- AuthorizationManager<RequestAuthorizationContext>
public final class WebExpressionAuthorizationManager
extends Object
implements AuthorizationManager<RequestAuthorizationContext>
An expression-based 
AuthorizationManager that determines the access by
 evaluating the provided expression.- Since:
- 5.8
- 
Constructor SummaryConstructorsConstructorDescriptionWebExpressionAuthorizationManager(String expressionString) Creates an instance.
- 
Method SummaryModifier and TypeMethodDescriptioncheck(Supplier<Authentication> authentication, RequestAuthorizationContext context) Determines the access by evaluating the provided expression.voidsetExpressionHandler(SecurityExpressionHandler<RequestAuthorizationContext> expressionHandler) Sets theSecurityExpressionHandlerto be used.toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.security.authorization.AuthorizationManagerauthorize, verify
- 
Constructor Details- 
WebExpressionAuthorizationManagerCreates an instance.- Parameters:
- expressionString- the raw expression string to parse
 
 
- 
- 
Method Details- 
setExpressionHandlerpublic void setExpressionHandler(SecurityExpressionHandler<RequestAuthorizationContext> expressionHandler) Sets theSecurityExpressionHandlerto be used. The default isDefaultHttpSecurityExpressionHandler.- Parameters:
- expressionHandler- the- SecurityExpressionHandlerto use
 
- 
checkpublic AuthorizationDecision check(Supplier<Authentication> authentication, RequestAuthorizationContext context) Determines the access by evaluating the provided expression.- Specified by:
- checkin interface- AuthorizationManager<RequestAuthorizationContext>
- Parameters:
- authentication- the- Supplierof the- Authenticationto check
- context- the- RequestAuthorizationContextto check
- Returns:
- an ExpressionAuthorizationDecisionbased on the evaluated expression
 
- 
toString
 
-