Class DefaultTransitionSecurityExpressionHandler
java.lang.Object
org.springframework.security.access.expression.AbstractSecurityExpressionHandler<Transition<?,?>>
org.springframework.statemachine.security.DefaultTransitionSecurityExpressionHandler
- All Implemented Interfaces:
org.springframework.aop.framework.AopInfrastructureBean
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.security.access.expression.SecurityExpressionHandler<Transition<?,
?>>
public class DefaultTransitionSecurityExpressionHandler
extends org.springframework.security.access.expression.AbstractSecurityExpressionHandler<Transition<?,?>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.access.expression.SecurityExpressionOperations
createSecurityExpressionRoot
(org.springframework.security.core.Authentication authentication, Transition<?, ?> transition) void
setDefaultRolePrefix
(String defaultRolePrefix) Sets the default prefix to be added toSecurityExpressionRoot.hasAnyRole(String...)
orSecurityExpressionRoot.hasRole(String)
.void
setTrustResolver
(org.springframework.security.authentication.AuthenticationTrustResolver trustResolver) Sets theAuthenticationTrustResolver
to be used.Methods inherited from class org.springframework.security.access.expression.AbstractSecurityExpressionHandler
createEvaluationContext, createEvaluationContextInternal, getBeanResolver, getExpressionParser, getPermissionEvaluator, getRoleHierarchy, setApplicationContext, setExpressionParser, setPermissionEvaluator, setRoleHierarchy
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.security.access.expression.SecurityExpressionHandler
createEvaluationContext
-
Constructor Details
-
DefaultTransitionSecurityExpressionHandler
public DefaultTransitionSecurityExpressionHandler()
-
-
Method Details
-
createSecurityExpressionRoot
protected org.springframework.security.access.expression.SecurityExpressionOperations createSecurityExpressionRoot(org.springframework.security.core.Authentication authentication, Transition<?, ?> transition) - Specified by:
createSecurityExpressionRoot
in classorg.springframework.security.access.expression.AbstractSecurityExpressionHandler<Transition<?,
?>>
-
setTrustResolver
public void setTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver trustResolver) Sets theAuthenticationTrustResolver
to be used. The default isAuthenticationTrustResolverImpl
.- Parameters:
trustResolver
- theAuthenticationTrustResolver
to use. Cannot be null.
-
setDefaultRolePrefix
Sets the default prefix to be added to
SecurityExpressionRoot.hasAnyRole(String...)
orSecurityExpressionRoot.hasRole(String)
. For example, if hasRole("ADMIN") or hasRole("ROLE_ADMIN") is passed in, then the role ROLE_ADMIN will be used when the defaultRolePrefix is "ROLE_" (default).If null or empty, then no default role prefix is used.
- Parameters:
defaultRolePrefix
- the default prefix to add to roles. Default "ROLE_".
-