Class AuthorizingAnnotationHandler

    • Constructor Detail

      • AuthorizingAnnotationHandler

        public AuthorizingAnnotationHandler(Class<? extends Annotation> annotationClass)
        Constructs an AuthorizingAnnotationHandler who processes annotations of the specified type. Immediately calls super(annotationClass).
        Parameters:
        annotationClass - the type of annotation this handler will process.
    • Method Detail

      • assertAuthorized

        public abstract void assertAuthorized(Annotation a)
                                       throws AuthorizationException
        Ensures the calling Subject is authorized to execute based on the directive(s) found in the given annotation.

        As this is an AnnotationMethodInterceptor, the implementations of this method typically inspect the annotation and perform a corresponding authorization check based.
        Parameters:
        a - the Annotation to check for performing an authorization check.
        Throws:
        AuthorizationException - if the class/instance/method is not allowed to proceed/execute.