public abstract class HttpHeaderTokenReader extends java.lang.Object implements TokenReader
Constructor and Description |
---|
HttpHeaderTokenReader() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Optional<java.lang.String> |
extractTokenFromAuthorization(java.lang.String authorization) |
java.util.Optional<java.lang.String> |
findToken(io.micronaut.http.HttpRequest<?> request)
Search for a JWT token in a HTTP request.
|
protected abstract java.lang.String |
getHeaderName() |
protected abstract java.lang.String |
getPrefix() |
protected abstract java.lang.String getPrefix()
protected abstract java.lang.String getHeaderName()
public java.util.Optional<java.lang.String> findToken(io.micronaut.http.HttpRequest<?> request)
findToken
in interface TokenReader
request
- The request to look for the token inprotected java.util.Optional<java.lang.String> extractTokenFromAuthorization(java.lang.String authorization)
authorization
- Authorization header value