/** * Default no-argument constructor that ensures this interceptor looks for * * {@link org.apache.shiro.authz.annotation.RequiresUser RequiresUser} annotations in a method * declaration. */ public UserAnnotationMethodInterceptor() { super( new UserAnnotationHandler() ); }
/** * * @param resolver * @since 1.1 */ public UserAnnotationMethodInterceptor(AnnotationResolver resolver) { super(new UserAnnotationHandler(), resolver); }
private static AuthorizingAnnotationHandler createHandler(Annotation annotation) { Class<?> t = annotation.annotationType(); if (RequiresPermissions.class.equals(t)) return new PermissionAnnotationHandler(); else if (RequiresRoles.class.equals(t)) return new RoleAnnotationHandler(); else if (RequiresUser.class.equals(t)) return new UserAnnotationHandler(); else if (RequiresGuest.class.equals(t)) return new GuestAnnotationHandler(); else if (RequiresAuthentication.class.equals(t)) return new AuthenticatedAnnotationHandler(); else throw new IllegalArgumentException("Cannot create a handler for the unknown for annotation " + t); }
/** * * @param resolver * @since 1.1 */ public UserAnnotationMethodInterceptor(AnnotationResolver resolver) { super(new UserAnnotationHandler(), resolver); }
/** * Default no-argument constructor that ensures this interceptor looks for * * {@link org.apache.shiro.authz.annotation.RequiresUser RequiresUser} annotations in a method * declaration. */ public UserAnnotationMethodInterceptor() { super( new UserAnnotationHandler() ); }
/** * Default no-argument constructor that ensures this interceptor looks for * * {@link org.apache.shiro.authz.annotation.RequiresUser RequiresUser} annotations in a method * declaration. */ public UserAnnotationMethodInterceptor() { super( new UserAnnotationHandler() ); }
/** * * @param resolver * @since 1.1 */ public UserAnnotationMethodInterceptor(AnnotationResolver resolver) { super(new UserAnnotationHandler(), resolver); }
private static AuthorizingAnnotationHandler createHandler(Annotation annotation) { Class<?> t = annotation.annotationType(); if (RequiresPermissions.class.equals(t)) return new PermissionAnnotationHandler(); else if (RequiresRoles.class.equals(t)) return new RoleAnnotationHandler(); else if (RequiresUser.class.equals(t)) return new UserAnnotationHandler(); else if (RequiresGuest.class.equals(t)) return new GuestAnnotationHandler(); else if (RequiresAuthentication.class.equals(t)) return new AuthenticatedAnnotationHandler(); else throw new IllegalArgumentException("Cannot create a handler for the unknown for annotation " + t); }