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.
@FunctionalInterface public interface AnnotationAnalyzer
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 aServiceLoader
- integration with Security is done automatically as long as the implementation is discovered as a java service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AnnotationAnalyzer.AnalyzerResponse
Response of an analysis run.static class
AnnotationAnalyzer.Flag
Flag for security type.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AnnotationAnalyzer.AnalyzerResponse
analyze(Class<?> maybeAnnotated)
Analyze an application class.default AnnotationAnalyzer.AnalyzerResponse
analyze(Class<?> maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse)
Analyze a resource class.default AnnotationAnalyzer.AnalyzerResponse
analyze(Method maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse)
Analyze a resource method.default void
init(Config config)
Provides configuration on node "security.jersey.analyzers".
-
-
-
Method Detail
-
init
default void init(Config config)
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
AnnotationAnalyzer.AnalyzerResponse analyze(Class<?> maybeAnnotated)
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
-
-