Example usage for org.apache.shiro.authz.aop AuthorizingAnnotationHandler assertAuthorized

List of usage examples for org.apache.shiro.authz.aop AuthorizingAnnotationHandler assertAuthorized

Introduction

In this page you can find the example usage for org.apache.shiro.authz.aop AuthorizingAnnotationHandler assertAuthorized.

Prototype

public abstract void assertAuthorized(Annotation a) throws AuthorizationException;

Source Link

Document

Ensures the calling Subject is authorized to execute based on the directive(s) found in the given annotation.

Usage

From source file:fiftyfive.wicket.shiro.ShiroWicketPlugin.java

License:Apache License

/**
 * @throws AuthorizationException if the given class, or any of its
 *         superclasses, has a Shiro annotation that fails its
 *         authorization check.//from   w ww .j  ava 2  s.  c  o  m
 */
private void assertAuthorized(final Class<?> cls) throws AuthorizationException {
    Collection<Annotation> annotations = findAnnotations(cls);
    for (Annotation annot : annotations) {
        for (AuthorizingAnnotationHandler h : HANDLERS) {
            h.assertAuthorized(annot);
        }
    }
}