Interface TokenValidator
-
- All Superinterfaces:
io.micronaut.core.order.Ordered
public interface TokenValidator extends io.micronaut.core.order.OrderedResponsible for token validation and claims retrieval.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.reactivestreams.Publisher<Authentication>validateToken(java.lang.String token, io.micronaut.http.HttpRequest<?> request)Validates the provided token and returns the authentication state.
-
-
-
Method Detail
-
validateToken
org.reactivestreams.Publisher<Authentication> validateToken(java.lang.String token, @Nullable io.micronaut.http.HttpRequest<?> request)
Validates the provided token and returns the authentication state.- Parameters:
token- The token stringrequest- The current request (or null)- Returns:
- An authentication publisher. If the publisher emits an error, no further validators will be attempted and the validation will fail. If the publisher is empty, further validators will be attempted. If the publisher emits an authentication, that authentication will be used.
-
-