Class DefaultMessageSecurityExpressionHandler<T>
java.lang.Object
org.springframework.security.access.expression.AbstractSecurityExpressionHandler<org.springframework.messaging.Message<T>>
org.springframework.security.messaging.access.expression.DefaultMessageSecurityExpressionHandler<T>
- Type Parameters:
- T- the type for the body of the Message
- All Implemented Interfaces:
- org.springframework.aop.framework.AopInfrastructureBean,- org.springframework.beans.factory.Aware,- org.springframework.context.ApplicationContextAware,- SecurityExpressionHandler<org.springframework.messaging.Message<T>>
public class DefaultMessageSecurityExpressionHandler<T>
extends AbstractSecurityExpressionHandler<org.springframework.messaging.Message<T>>
The default implementation of 
SecurityExpressionHandler which uses a
 MessageSecurityExpressionRoot.- Since:
- 4.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.springframework.expression.EvaluationContextcreateEvaluationContext(Supplier<Authentication> authentication, org.springframework.messaging.Message<T> message) Provides an evaluation context in which to evaluate security expressions for the invocation type.protected SecurityExpressionOperationscreateSecurityExpressionRoot(Authentication authentication, org.springframework.messaging.Message<T> invocation) Implement in order to create a root object of the correct type for the supported invocation type.voidsetTrustResolver(AuthenticationTrustResolver trustResolver) Methods inherited from class org.springframework.security.access.expression.AbstractSecurityExpressionHandlercreateEvaluationContext, createEvaluationContextInternal, getBeanResolver, getExpressionParser, getPermissionEvaluator, getRoleHierarchy, setApplicationContext, setExpressionParser, setPermissionEvaluator, setRoleHierarchy
- 
Constructor Details- 
DefaultMessageSecurityExpressionHandlerpublic DefaultMessageSecurityExpressionHandler()
 
- 
- 
Method Details- 
createEvaluationContextpublic org.springframework.expression.EvaluationContext createEvaluationContext(Supplier<Authentication> authentication, org.springframework.messaging.Message<T> message) Description copied from interface:SecurityExpressionHandlerProvides an evaluation context in which to evaluate security expressions for the invocation type. You can override this method in order to provide a custom implementation that uses lazy initialization of theAuthenticationobject. By default, this method uses eager initialization of theAuthenticationobject.- Parameters:
- authentication- the- Supplierof the- Authenticationto use
- message- the- SecurityExpressionHandlerto use
- Returns:
- the EvaluationContextto use
 
- 
createSecurityExpressionRootprotected SecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication, org.springframework.messaging.Message<T> invocation) Description copied from class:AbstractSecurityExpressionHandlerImplement in order to create a root object of the correct type for the supported invocation type.- Specified by:
- createSecurityExpressionRootin class- AbstractSecurityExpressionHandler<org.springframework.messaging.Message<T>>
- Parameters:
- authentication- the current authentication object
- invocation- the invocation (filter, method, channel)
- Returns:
- the object
 
- 
setTrustResolver
 
-