Class JwtAuthAnnotationAnalyzer
- All Implemented Interfaces:
AnnotationAnalyzer
AnnotationAnalyzer which checks for LoginConfig annotation if
JWT Authentication should be enabled.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.security.providers.common.spi.AnnotationAnalyzer
AnnotationAnalyzer.AnalyzerResponse, AnnotationAnalyzer.Flag -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyze(TypeName typeName, TypedElementInfo method, AnnotationAnalyzer.AnalyzerResponse previousResponse) Analyze a resource method.analyze(TypeName applicationType, List<Annotation> annotations) Analyze application annotations.analyze(TypeName endpointType, List<Annotation> annotations, AnnotationAnalyzer.AnalyzerResponse previousResponse) Analyze a resource type.Analyze an application class.analyze(Class<?> maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse) Analyze a resource class.analyze(Method maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse) Analyze a resource method.voidProvides configuration on node "security.jersey.analyzers".booleanWhether this analyzer supports expanded callbacks for separate resource definition, declaring, and handling stages.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.security.providers.common.spi.AnnotationAnalyzer
init
-
Constructor Details
-
JwtAuthAnnotationAnalyzer
public JwtAuthAnnotationAnalyzer()
-
-
Method Details
-
supportsExpandedEndpointAnalysis
public boolean supportsExpandedEndpointAnalysis()Description copied from interface:AnnotationAnalyzerWhether this analyzer supports expanded callbacks for separate resource definition, declaring, and handling stages.The default preserves the original application, resource-class, and resource-method callback topology. The returned value must remain stable after initialization.
- Specified by:
supportsExpandedEndpointAnalysisin interfaceAnnotationAnalyzer- Returns:
trueto opt in to expanded endpoint analysis
-
init
Description copied from interface:AnnotationAnalyzerProvides configuration on node "security.jersey.analyzers".API Note: the default method implementation is provided for backward compatibility and will be removed in the next major version
- Specified by:
initin interfaceAnnotationAnalyzer- Parameters:
config- config to use to configure an analyzer, may be empty (e.g. have reasonable defaults if possible)
-
analyze
public AnnotationAnalyzer.AnalyzerResponse analyze(TypeName applicationType, List<Annotation> annotations) Description copied from interface:AnnotationAnalyzerAnalyze application annotations.- Specified by:
analyzein interfaceAnnotationAnalyzer- Parameters:
applicationType- type to analyzeannotations- annotations on the type- Returns:
- response on how to authenticate and authorize
-
analyze
public AnnotationAnalyzer.AnalyzerResponse analyze(TypeName endpointType, List<Annotation> annotations, AnnotationAnalyzer.AnalyzerResponse previousResponse) Description copied from interface:AnnotationAnalyzerAnalyze a resource type.By default, the supplied annotations are the complete annotation view of the selected resource class. An analyzer that opts in through
AnnotationAnalyzer.supportsExpandedEndpointAnalysis()may receive several ordered callbacks for a resource's selected definition, method-declaring type, and concrete handling type. The supplied annotations are then exactly those selected for that stage and may be a declared, inherited, or filtered subset.- Specified by:
analyzein interfaceAnnotationAnalyzer- Parameters:
endpointType- type analyzed at this stageannotations- annotations selected for this stagepreviousResponse- response returned by this analyzer for the preceding class or method stage- Returns:
- response describing authentication and authorization requirements
-
analyze
public AnnotationAnalyzer.AnalyzerResponse analyze(TypeName typeName, TypedElementInfo method, AnnotationAnalyzer.AnalyzerResponse previousResponse) Description copied from interface:AnnotationAnalyzerAnalyze a resource method.An analyzer that opts in through
AnnotationAnalyzer.supportsExpandedEndpointAnalysis()may receive separate callbacks for a resource's selected definition method and actual handling method. The supplied metadata is the method view selected for this stage, andpreviousResponseis the response returned by this analyzer for the immediately preceding class or method stage.- Specified by:
analyzein interfaceAnnotationAnalyzer- Parameters:
typeName- declaring type of the method analyzed at this stagemethod- method metadata selected for this stagepreviousResponse- response from the preceding analyzer stage- Returns:
- response describing authentication and authorization requirements
-
analyze
Description copied from interface:AnnotationAnalyzerAnalyze an application class.- Specified by:
analyzein interfaceAnnotationAnalyzer- Parameters:
maybeAnnotated- class of the JAX-RS application- Returns:
- response with information whether to (and how) authenticate and authorize
-
analyze
public AnnotationAnalyzer.AnalyzerResponse analyze(Class<?> maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse) Description copied from interface:AnnotationAnalyzerAnalyze a resource class.An analyzer that opts in through
AnnotationAnalyzer.supportsExpandedEndpointAnalysis()may receive several ordered class and method stages for resource definitions, declaring types, and concrete handlers. In that case,previousResponseis the response returned by this analyzer for the immediately preceding stage and may be a method-stage response.This legacy reflection callback receives the complete reflective class view and cannot represent a scoped or filtered annotation list. When called through the metadata callback's default implementation, filtering performed by the integration is therefore not visible. Integrations may omit legacy callbacks for stages that cannot be represented faithfully.
- Specified by:
analyzein interfaceAnnotationAnalyzer- Parameters:
maybeAnnotated- class analyzed at this stagepreviousResponse- response from the preceding analyzer stage- Returns:
- response describing authentication and authorization requirements
-
analyze
public AnnotationAnalyzer.AnalyzerResponse analyze(Method maybeAnnotated, AnnotationAnalyzer.AnalyzerResponse previousResponse) Description copied from interface:AnnotationAnalyzerAnalyze a resource method.An analyzer that opts in through
AnnotationAnalyzer.supportsExpandedEndpointAnalysis()may receive both Jersey's selected resource-definition method and the actual handling method.previousResponseis the response returned by this analyzer for the immediately preceding stage, normally the last applicable class stage.This legacy callback receives the complete reflective method view. The metadata callback's default implementation delegates here using its originating
Method, when available, or a reflectively resolved matching method.- Specified by:
analyzein interfaceAnnotationAnalyzer- Parameters:
maybeAnnotated- method analyzed at this stagepreviousResponse- response from the preceding analyzer stage- Returns:
- response describing authentication and authorization requirements
-
toString
-