public class AuthenticatedAnnotationHandler extends AuthorizingAnnotationHandler
RequiresAuthentication
annotations and ensures the calling subject is
authenticated before allowing access.annotationClass
Constructor and Description |
---|
AuthenticatedAnnotationHandler()
Default no-argument constructor that ensures this handler to process
RequiresAuthentication annotations. |
Modifier and Type | Method and Description |
---|---|
void |
assertAuthorized(Annotation a)
Ensures that the calling
Subject is authenticated, and if not, throws an
UnauthenticatedException indicating the method is not allowed to be executed. |
getAnnotationClass, getSubject, setAnnotationClass
public AuthenticatedAnnotationHandler()
RequiresAuthentication
annotations.public void assertAuthorized(Annotation a) throws UnauthenticatedException
Subject
is authenticated, and if not, throws an
UnauthenticatedException
indicating the method is not allowed to be executed.assertAuthorized
in class AuthorizingAnnotationHandler
a
- the annotation to inspectUnauthenticatedException
- if the calling Subject
has not yet
authenticated.Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.