Class DefaultWebSecurityExpressionHandler
java.lang.Object
org.springframework.security.access.expression.AbstractSecurityExpressionHandler<org.springframework.security.web.FilterInvocation>
org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler
- All Implemented Interfaces:
org.springframework.aop.framework.AopInfrastructureBean,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.security.access.expression.SecurityExpressionHandler<org.springframework.security.web.FilterInvocation>
public class DefaultWebSecurityExpressionHandler
extends org.springframework.security.access.expression.AbstractSecurityExpressionHandler<org.springframework.security.web.FilterInvocation>
implements org.springframework.security.access.expression.SecurityExpressionHandler<org.springframework.security.web.FilterInvocation>
- Since:
- 3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.access.expression.SecurityExpressionOperationscreateSecurityExpressionRoot(@Nullable org.springframework.security.core.Authentication authentication, org.springframework.security.web.FilterInvocation fi) voidsetDefaultRolePrefix(@Nullable String defaultRolePrefix) Deprecated.voidsetTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver trustResolver) Deprecated.UseAbstractSecurityExpressionHandler.setAuthorizationManagerFactory(AuthorizationManagerFactory)insteadMethods inherited from class org.springframework.security.access.expression.AbstractSecurityExpressionHandler
createEvaluationContext, createEvaluationContextInternal, getAuthorizationManagerFactory, getBeanResolver, getDefaultAuthorizationManagerFactory, getExpressionParser, getPermissionEvaluator, getRoleHierarchy, setApplicationContext, setAuthorizationManagerFactory, setExpressionParser, setPermissionEvaluator, setRoleHierarchyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.access.expression.SecurityExpressionHandler
createEvaluationContext, createEvaluationContext, getExpressionParser
-
Constructor Details
-
DefaultWebSecurityExpressionHandler
public DefaultWebSecurityExpressionHandler()
-
-
Method Details
-
createSecurityExpressionRoot
protected org.springframework.security.access.expression.SecurityExpressionOperations createSecurityExpressionRoot(@Nullable org.springframework.security.core.Authentication authentication, org.springframework.security.web.FilterInvocation fi) - Specified by:
createSecurityExpressionRootin classorg.springframework.security.access.expression.AbstractSecurityExpressionHandler<org.springframework.security.web.FilterInvocation>
-
setTrustResolver
@Deprecated(since="7.0") public void setTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver trustResolver) Deprecated.UseAbstractSecurityExpressionHandler.setAuthorizationManagerFactory(AuthorizationManagerFactory)insteadSets theAuthenticationTrustResolverto be used. The default isAuthenticationTrustResolverImpl.- Parameters:
trustResolver- theAuthenticationTrustResolverto use. Cannot be null.
-
setDefaultRolePrefix
Deprecated.UseAbstractSecurityExpressionHandler.setAuthorizationManagerFactory(AuthorizationManagerFactory)insteadSets 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_".
-
AbstractSecurityExpressionHandler.setAuthorizationManagerFactory(AuthorizationManagerFactory)instead