org.apache.shiro.authz.aop
Class GuestAnnotationMethodInterceptor

java.lang.Object
  extended by org.apache.shiro.aop.MethodInterceptorSupport
      extended by org.apache.shiro.aop.AnnotationMethodInterceptor
          extended by org.apache.shiro.authz.aop.AuthorizingAnnotationMethodInterceptor
              extended by org.apache.shiro.authz.aop.GuestAnnotationMethodInterceptor
All Implemented Interfaces:
MethodInterceptor

public class GuestAnnotationMethodInterceptor
extends AuthorizingAnnotationMethodInterceptor

Checks to see if a @RequiresGuest annotation is declared, and if so, ensures the calling Subject does not have an identity before invoking the method.

This annotation essentially ensures that subject.getPrincipal() == null.

Since:
0.9.0

Constructor Summary
GuestAnnotationMethodInterceptor()
          Default no-argument constructor that ensures this interceptor looks for RequiresGuest annotations in a method declaration.
GuestAnnotationMethodInterceptor(AnnotationResolver resolver)
           
 
Method Summary
 
Methods inherited from class org.apache.shiro.authz.aop.AuthorizingAnnotationMethodInterceptor
assertAuthorized, invoke
 
Methods inherited from class org.apache.shiro.aop.AnnotationMethodInterceptor
getAnnotation, getHandler, getResolver, setHandler, setResolver, supports
 
Methods inherited from class org.apache.shiro.aop.MethodInterceptorSupport
getSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuestAnnotationMethodInterceptor

public GuestAnnotationMethodInterceptor()
Default no-argument constructor that ensures this interceptor looks for RequiresGuest annotations in a method declaration.


GuestAnnotationMethodInterceptor

public GuestAnnotationMethodInterceptor(AnnotationResolver resolver)
Parameters:
resolver -
Since:
1.1


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.