public class DefaultTransitionSecurityExpressionHandler extends org.springframework.security.access.expression.AbstractSecurityExpressionHandler<Transition<?,?>>
Constructor and Description |
---|
DefaultTransitionSecurityExpressionHandler() |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.security.access.expression.SecurityExpressionOperations |
createSecurityExpressionRoot(org.springframework.security.core.Authentication authentication,
Transition<?,?> transition) |
void |
setDefaultRolePrefix(java.lang.String defaultRolePrefix)
Sets the default prefix to be added to
SecurityExpressionRoot.hasAnyRole(String...)
or
SecurityExpressionRoot.hasRole(String)
. |
void |
setTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver trustResolver)
Sets the
AuthenticationTrustResolver to be used. |
createEvaluationContext, createEvaluationContextInternal, getExpressionParser, getPermissionEvaluator, getRoleHierarchy, setApplicationContext, setExpressionParser, setPermissionEvaluator, setRoleHierarchy
public DefaultTransitionSecurityExpressionHandler()
protected org.springframework.security.access.expression.SecurityExpressionOperations createSecurityExpressionRoot(org.springframework.security.core.Authentication authentication, Transition<?,?> transition)
createSecurityExpressionRoot
in class org.springframework.security.access.expression.AbstractSecurityExpressionHandler<Transition<?,?>>
public void setTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver trustResolver)
AuthenticationTrustResolver
to be used. The default is
AuthenticationTrustResolverImpl
.trustResolver
- the AuthenticationTrustResolver
to use. Cannot be
null.public void setDefaultRolePrefix(java.lang.String defaultRolePrefix)
Sets the default prefix to be added to
SecurityExpressionRoot.hasAnyRole(String...)
or
SecurityExpressionRoot.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.
defaultRolePrefix
- the default prefix to add to roles. Default "ROLE_".