@Requires(property="micronaut.security.token.basic-auth.enabled", notEquals="false") @Singleton public class BasicAuthTokenValidator extends java.lang.Object implements TokenValidator
Modifier and Type | Field and Description |
---|---|
protected Authenticator |
authenticator |
static java.lang.Integer |
ORDER
The order of the TokenValidator.
|
Constructor and Description |
---|
BasicAuthTokenValidator(Authenticator authenticator)
Deprecated.
|
BasicAuthTokenValidator(Authenticator authenticator,
TokenConfiguration tokenConfiguration) |
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
org.reactivestreams.Publisher<Authentication> |
validateToken(java.lang.String encodedToken)
Validates the provided token and returns the authentication state.
|
public static final java.lang.Integer ORDER
protected final Authenticator authenticator
@Deprecated public BasicAuthTokenValidator(Authenticator authenticator)
BasicAuthTokenValidator(Authenticator, TokenConfiguration)
authenticator
- The Authenticator@Inject public BasicAuthTokenValidator(Authenticator authenticator, TokenConfiguration tokenConfiguration)
authenticator
- The AuthenticatortokenConfiguration
- The Token configuration.public org.reactivestreams.Publisher<Authentication> validateToken(java.lang.String encodedToken)
TokenValidator
validateToken
in interface TokenValidator
encodedToken
- The token stringOptional.empty()
if the validation failspublic int getOrder()
getOrder
in interface io.micronaut.core.order.Ordered