Class AuthorizationManagerWebInvocationPrivilegeEvaluator
- java.lang.Object
-
- org.springframework.security.web.access.AuthorizationManagerWebInvocationPrivilegeEvaluator
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,WebInvocationPrivilegeEvaluator,org.springframework.web.context.ServletContextAware
public final class AuthorizationManagerWebInvocationPrivilegeEvaluator extends java.lang.Object implements WebInvocationPrivilegeEvaluator, org.springframework.web.context.ServletContextAware
An implementation ofWebInvocationPrivilegeEvaluatorwhich delegates the checks to an instance ofAuthorizationManager- Since:
- 5.5.5
-
-
Constructor Summary
Constructors Constructor Description AuthorizationManagerWebInvocationPrivilegeEvaluator(org.springframework.security.authorization.AuthorizationManager<javax.servlet.http.HttpServletRequest> authorizationManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAllowed(java.lang.String contextPath, java.lang.String uri, java.lang.String method, org.springframework.security.core.Authentication authentication)Determines whether the user represented by the supplied Authentication object is allowed to invoke the supplied URI, with the given .booleanisAllowed(java.lang.String uri, org.springframework.security.core.Authentication authentication)Determines whether the user represented by the supplied Authentication object is allowed to invoke the supplied URI.voidsetServletContext(javax.servlet.ServletContext servletContext)
-
-
-
Method Detail
-
isAllowed
public boolean isAllowed(java.lang.String uri, org.springframework.security.core.Authentication authentication)Description copied from interface:WebInvocationPrivilegeEvaluatorDetermines whether the user represented by the supplied Authentication object is allowed to invoke the supplied URI.- Specified by:
isAllowedin interfaceWebInvocationPrivilegeEvaluator- Parameters:
uri- the URI excluding the context path (a default context path setting will be used)
-
isAllowed
public boolean isAllowed(java.lang.String contextPath, java.lang.String uri, java.lang.String method, org.springframework.security.core.Authentication authentication)Description copied from interface:WebInvocationPrivilegeEvaluatorDetermines whether the user represented by the supplied Authentication object is allowed to invoke the supplied URI, with the given .Note the default implementation of FilterInvocationSecurityMetadataSource disregards the
contextPathwhen evaluating which secure object metadata applies to a given request URI, so generally thecontextPathis unimportant unless you are using a customFilterInvocationSecurityMetadataSource.- Specified by:
isAllowedin interfaceWebInvocationPrivilegeEvaluator- Parameters:
contextPath- the context path (may be null).uri- the URI excluding the context pathmethod- the HTTP method (or null, for any method)authentication- the Authentication instance whose authorities should be used in evaluation whether access should be granted.- Returns:
- true if access is allowed, false if denied
-
setServletContext
public void setServletContext(javax.servlet.ServletContext servletContext)
- Specified by:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware
-
-