Package org.atmosphere.auth
Interface TokenValidator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
SPI for validating authentication tokens on Atmosphere connections. Returns a
TokenValidator.Result that the AuthInterceptor uses
to allow, deny, or trigger refresh flows.- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe token has expired but was otherwise valid.static final recordThe token is invalid (bad signature, malformed, revoked, etc.).static interfaceThe result of token validation.static final recordThe token is valid. -
Method Summary
Modifier and TypeMethodDescriptionValidate the given token string.
-
Method Details
-
validate
Validate the given token string.- Parameters:
token- the raw token extracted from the request (header or query param)- Returns:
- a
TokenValidator.Resultindicating the outcome
-