Class CookieTokenReader
java.lang.Object
io.micronaut.security.token.cookie.CookieTokenReader
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,TokenReader<io.micronaut.http.HttpRequest<?>>
@Requires(classes=io.micronaut.http.HttpRequest.class) @Requires(condition=CookieBasedAuthenticationModeCondition.class) @Requires(property="micronaut.security.token.cookie.enabled",notEquals="false",defaultValue="true")
@Singleton
public class CookieTokenReader
extends Object
implements TokenReader<io.micronaut.http.HttpRequest<?>>
Reads the token from the configured io.micronaut.security.token.jwt.cookie.
- Since:
- 1.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AccessTokenCookieConfiguration
static final Integer
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionCookieTokenReader
(AccessTokenCookieConfiguration accessTokenCookieConfiguration) -
Method Summary
-
Field Details
-
ORDER
-
accessTokenCookieConfiguration
-
-
Constructor Details
-
CookieTokenReader
- Parameters:
accessTokenCookieConfiguration
- Configuration properties for JWT Cookie support
-
-
Method Details
-
findToken
Description copied from interface:TokenReader
Attempts to retrieve a token in a request.- Specified by:
findToken
in interfaceTokenReader<io.micronaut.http.HttpRequest<?>>
- Parameters:
request
- The request to look for the token in- Returns:
- An optional token string
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceio.micronaut.core.order.Ordered
-