/** * Default no-argument constructor that ensures this interceptor looks for * {@link org.apache.shiro.authz.annotation.RequiresAuthentication RequiresAuthentication} annotations in a method * declaration. */ public AuthenticatedAnnotationMethodInterceptor() { super(new AuthenticatedAnnotationHandler()); }
/** * @param resolver * @since 1.1 */ public AuthenticatedAnnotationMethodInterceptor(AnnotationResolver resolver) { super(new AuthenticatedAnnotationHandler(), 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); }
/** * Default no-argument constructor that ensures this interceptor looks for * {@link org.apache.shiro.authz.annotation.RequiresAuthentication RequiresAuthentication} annotations in a method * declaration. */ public AuthenticatedAnnotationMethodInterceptor() { super(new AuthenticatedAnnotationHandler()); }
/** * @param resolver * @since 1.1 */ public AuthenticatedAnnotationMethodInterceptor(AnnotationResolver resolver) { super(new AuthenticatedAnnotationHandler(), resolver); } }
/** * Default no-argument constructor that ensures this interceptor looks for * {@link org.apache.shiro.authz.annotation.RequiresAuthentication RequiresAuthentication} annotations in a method * declaration. */ public AuthenticatedAnnotationMethodInterceptor() { super(new AuthenticatedAnnotationHandler()); }
/** * @param resolver * @since 1.1 */ public AuthenticatedAnnotationMethodInterceptor(AnnotationResolver resolver) { super(new AuthenticatedAnnotationHandler(), 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); }