Class AuthorizingMethodInterceptor
java.lang.Object
org.apache.shiro.aop.MethodInterceptorSupport
org.apache.shiro.authz.aop.AuthorizingMethodInterceptor
- All Implemented Interfaces:
MethodInterceptor
- Direct Known Subclasses:
AnnotationsAuthorizingMethodInterceptor
Basic abstract class to support intercepting methods that perform authorization (access control) checks.
- Since:
- 0.9
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidassertAuthorized(MethodInvocation methodInvocation) Asserts that the specified MethodInvocation is allowed to continue by performing any necessary authorization (access control) checks first.invoke(MethodInvocation methodInvocation) Invokes the specified method (methodInvocation.if authorization is allowed by first callingproceed()assertAuthorized.Methods inherited from class org.apache.shiro.aop.MethodInterceptorSupport
getSubject
-
Constructor Details
-
AuthorizingMethodInterceptor
public AuthorizingMethodInterceptor()
-
-
Method Details
-
invoke
Invokes the specified method (methodInvocation.if authorization is allowed by first callingproceed()assertAuthorized.- Parameters:
methodInvocation- theMethodInvocationto execute.- Returns:
- the result of the invocation
- Throws:
Throwable- if the method invocation throws a Throwable or if an error occurs in pre/post/finally advice.
-
assertAuthorized
protected abstract void assertAuthorized(MethodInvocation methodInvocation) throws AuthorizationException Asserts that the specified MethodInvocation is allowed to continue by performing any necessary authorization (access control) checks first.- Parameters:
methodInvocation- theMethodInvocationto invoke.- Throws:
AuthorizationException- if themethodInvocationshould not be allowed to continue/execute.
-