Interface AnnotationAnalyzer
- All Known Implementing Classes:
JwtAuthAnnotationAnalyzer,RoleAnnotationAnalyzer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Provides capability to extensions to enforce authentication and authorization even when
the resource is not annotated with io.helidon.security.annotations.Authenticated or
io.helidon.security.annotations.Authorized.
This is loaded using a
ServiceLoader - integration with Security is done automatically as long as the
implementation is discovered as a java service.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classResponse of an analysis run.static enumFlag for security type. -
Method Summary
Modifier and TypeMethodDescriptionAnalyze an application class.analyze(Class<?> maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse) Analyze a resource class.analyze(Method maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse) Analyze a resource method.default voidProvides configuration on node "security.jersey.analyzers".
-
Method Details
-
init
Provides configuration on node "security.jersey.analyzers".- Parameters:
config- config to use to configure an analyzer, may be empty (e.g. have reasonable defaults if possible)
-
analyze
Analyze an application class.- Parameters:
maybeAnnotated- class of the JAX-RS application- Returns:
- response with information whether to (and how) authenticate and authorize
-
analyze
default AnnotationAnalyzer.AnalyzerResponse analyze(Class<?> maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse) Analyze a resource class. By default returns an abstain response.- Parameters:
maybeAnnotated- class of the JAX-RS resourcepreviousResponse- response from parent of this class (e.g. from application analysis)- Returns:
- response with information whether to (and how) authenticate and authorize
-
analyze
default AnnotationAnalyzer.AnalyzerResponse analyze(Method maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse) Analyze a resource method. By default returns an abstain response.- Parameters:
maybeAnnotated- JAX-RS resource methodpreviousResponse- response from parent of this class (e.g. from resource class analysis)- Returns:
- response with information whether to (and how) authenticate and authorize
-