@Requires(property="micronaut.security.authentication", value="idtoken") @Singleton public class IdTokenLoginHandler extends CookieLoginHandler
CookieLoginHandler
`s cookie value to the idtoken received from an authentication provider.
The cookie expiration is set to the expiration of the IDToken exp claim.accessTokenCookieConfiguration, jwtCookieConfiguration, loginFailure, loginSuccess, priorToLoginPersistence, refresh
Constructor and Description |
---|
IdTokenLoginHandler(AccessTokenCookieConfiguration accessTokenCookieConfiguration,
RedirectConfiguration redirectConfiguration,
TokenConfiguration tokenConfiguration,
PriorToLoginPersistence priorToLoginPersistence) |
IdTokenLoginHandler(JwtCookieConfiguration jwtCookieConfiguration,
RedirectConfiguration redirectConfiguration,
TokenConfiguration tokenConfiguration,
PriorToLoginPersistence priorToLoginPersistence)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected java.time.Duration |
cookieExpiration(UserDetails userDetails,
io.micronaut.http.HttpRequest<?> request) |
protected java.util.List<io.micronaut.http.cookie.Cookie> |
getCookies(UserDetails userDetails,
io.micronaut.http.HttpRequest<?> request) |
protected java.util.List<io.micronaut.http.cookie.Cookie> |
getCookies(UserDetails userDetails,
java.lang.String refreshToken,
io.micronaut.http.HttpRequest<?> request) |
protected java.util.Optional<java.lang.String> |
parseIdToken(UserDetails userDetails) |
applyCookies, createRefreshResponse, createSuccessResponse, loginFailed, loginRefresh, loginSuccess
@Deprecated public IdTokenLoginHandler(JwtCookieConfiguration jwtCookieConfiguration, RedirectConfiguration redirectConfiguration, TokenConfiguration tokenConfiguration, @Nullable PriorToLoginPersistence priorToLoginPersistence)
@Inject public IdTokenLoginHandler(AccessTokenCookieConfiguration accessTokenCookieConfiguration, RedirectConfiguration redirectConfiguration, TokenConfiguration tokenConfiguration, @Nullable PriorToLoginPersistence priorToLoginPersistence)
protected java.util.List<io.micronaut.http.cookie.Cookie> getCookies(UserDetails userDetails, io.micronaut.http.HttpRequest<?> request)
getCookies
in class CookieLoginHandler
protected java.util.List<io.micronaut.http.cookie.Cookie> getCookies(UserDetails userDetails, java.lang.String refreshToken, io.micronaut.http.HttpRequest<?> request)
getCookies
in class CookieLoginHandler
protected java.util.Optional<java.lang.String> parseIdToken(UserDetails userDetails)
userDetails
- User Detailsprotected java.time.Duration cookieExpiration(UserDetails userDetails, io.micronaut.http.HttpRequest<?> request)
userDetails
- User Detailsrequest
- The current request