AfterInvocation
class AfterInvocation implements InterceptorInterface (View source)
This is the second main security interceptor, which enforces the current security policy for return values and is usually applied over AOP:
- We call the AfterInvocationManager with the method's return value as parameter
- If we had a "run as" support, we would have to reset the security context
- If a PermissionDeniedException was thrown we look for any an authentication entry point in the active tokens to redirect to authentication
- Then the value is returned to the caller
Properties
protected AfterInvocationManagerInterface | $afterInvocationManager | ||
protected mixed | $result | Result of the (probably intercepted) target method |
Methods
__construct(Context $securityContext, AfterInvocationManagerInterface $afterInvocationManager)
Constructor.
void
void
setResult(mixed $result)
Sets the result (return object) of the intercepted method
bool
invoke()
Invokes the security interception
Details
__construct(Context $securityContext, AfterInvocationManagerInterface $afterInvocationManager)
Constructor.
void
setJoinPoint(JoinPointInterface $joinPoint)
Sets the current joinpoint for this interception
void
setResult(mixed $result)
Sets the result (return object) of the intercepted method
bool
invoke()
Invokes the security interception