@Singleton public class DefaultTokenResolver extends java.lang.Object implements TokenResolver
TokenResolver
.Constructor and Description |
---|
DefaultTokenResolver(java.util.Collection<TokenReader> tokenReaders)
Instantiates a
DefaultTokenResolver with a list of available TokenReader . |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
resolveToken(io.micronaut.http.HttpRequest<?> request)
Returns the first token found by the supplied token readers.
|
public DefaultTokenResolver(java.util.Collection<TokenReader> tokenReaders)
DefaultTokenResolver
with a list of available TokenReader
.tokenReaders
- Collection of available TokenReader
beans.public java.util.Optional<java.lang.String> resolveToken(io.micronaut.http.HttpRequest<?> request)
resolveToken
in interface TokenResolver
request
- The current HTTP request.