Class AspectJMethodSecurityInterceptor
- java.lang.Object
-
- org.springframework.security.access.intercept.AbstractSecurityInterceptor
-
- org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
-
- org.springframework.security.access.intercept.aspectj.AspectJMethodSecurityInterceptor
-
- All Implemented Interfaces:
org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationEventPublisherAware,org.springframework.context.MessageSourceAware
public final class AspectJMethodSecurityInterceptor extends MethodSecurityInterceptor
AspectJJoinPointsecurity interceptor which wraps theJoinPointin aMethodInvocationadapter to make it compatible with security infrastructure classes which only supportMethodInvocations.One of the
invokemethods should be called from thearound()advice in your aspect. Alternatively you can use one of the pre-defined aspects from the aspects module.- Since:
- 3.0.3
-
-
Field Summary
-
Fields inherited from class org.springframework.security.access.intercept.AbstractSecurityInterceptor
logger, messages
-
-
Constructor Summary
Constructors Constructor Description AspectJMethodSecurityInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectinvoke(org.aspectj.lang.JoinPoint jp)Method that is suitable for user with @Aspect notation.java.lang.Objectinvoke(org.aspectj.lang.JoinPoint jp, AspectJCallback advisorProceed)Method that is suitable for user with traditional AspectJ-code aspects.-
Methods inherited from class org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
getSecureObjectClass, getSecurityMetadataSource, invoke, obtainSecurityMetadataSource, setSecurityMetadataSource
-
Methods inherited from class org.springframework.security.access.intercept.AbstractSecurityInterceptor
afterInvocation, afterPropertiesSet, beforeInvocation, finallyInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setPublishAuthorizationSuccess, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes
-
-
-
-
Method Detail
-
invoke
public java.lang.Object invoke(org.aspectj.lang.JoinPoint jp) throws java.lang.ThrowableMethod that is suitable for user with @Aspect notation.- Parameters:
jp- The AspectJ joint point being invoked which requires a security decision- Returns:
- The returned value from the method invocation
- Throws:
java.lang.Throwable- if the invocation throws one
-
invoke
public java.lang.Object invoke(org.aspectj.lang.JoinPoint jp, AspectJCallback advisorProceed)Method that is suitable for user with traditional AspectJ-code aspects.- Parameters:
jp- The AspectJ joint point being invoked which requires a security decisionadvisorProceed- the advice-defined anonymous class that implementsAspectJCallbackcontaining a simplereturn proceed();statement- Returns:
- The returned value from the method invocation
-
-