public class AspectJSecurityInterceptor extends AbstractSecurityInterceptor
The ObjectDefinitionSource
required
by this security interceptor is of type MethodDefinitionSource
. This is shared with the AOP Alliance based
security interceptor (MethodSecurityInterceptor
), since both work with Java Method
s.
The secure object type is org.aspectj.lang.JoinPoint
, which is passed from the relevant
around()
advice. The around()
advice also passes an anonymous implementation of AspectJCallback
which contains the call for AspectJ to continue processing: return proceed();
.
Refer to AbstractSecurityInterceptor
for details on the workflow.
logger, messages
Constructor and Description |
---|
AspectJSecurityInterceptor() |
Modifier and Type | Method and Description |
---|---|
MethodDefinitionSource |
getObjectDefinitionSource() |
Class |
getSecureObjectClass()
Indicates the type of secure objects the subclass will be presenting to
the abstract parent for processing.
|
Object |
invoke(org.aspectj.lang.JoinPoint jp,
AspectJCallback advisorProceed)
This method should be used to enforce security on a
JoinPoint . |
ObjectDefinitionSource |
obtainObjectDefinitionSource() |
void |
setObjectDefinitionSource(MethodDefinitionSource newSource) |
afterInvocation, afterPropertiesSet, beforeInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes
public MethodDefinitionSource getObjectDefinitionSource()
public Class getSecureObjectClass()
AbstractSecurityInterceptor
AbstractSecurityInterceptor
all support the
indicated secure object class.getSecureObjectClass
in class AbstractSecurityInterceptor
public Object invoke(org.aspectj.lang.JoinPoint jp, AspectJCallback advisorProceed)
JoinPoint
.jp
- The AspectJ joint point being invoked which requires a security decisionadvisorProceed
- the advice-defined anonymous class that implements AspectJCallback
containing
a simple return proceed();
statementpublic ObjectDefinitionSource obtainObjectDefinitionSource()
obtainObjectDefinitionSource
in class AbstractSecurityInterceptor
public void setObjectDefinitionSource(MethodDefinitionSource newSource)
Copyright © 2019. All rights reserved.