public class DefaultWebSecurityExpressionHandler extends org.springframework.security.access.expression.AbstractSecurityExpressionHandler<FilterInvocation> implements org.springframework.security.access.expression.SecurityExpressionHandler<FilterInvocation>
| Constructor and Description |
|---|
DefaultWebSecurityExpressionHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.security.access.expression.SecurityExpressionOperations |
createSecurityExpressionRoot(org.springframework.security.core.Authentication authentication,
FilterInvocation fi) |
void |
setDefaultRolePrefix(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, setRoleHierarchyprotected org.springframework.security.access.expression.SecurityExpressionOperations createSecurityExpressionRoot(org.springframework.security.core.Authentication authentication,
FilterInvocation fi)
createSecurityExpressionRoot in class org.springframework.security.access.expression.AbstractSecurityExpressionHandler<FilterInvocation>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(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_".