@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.jwtCookieConfiguration, loginFailure, loginSuccess, priorToLoginPersistence, refresh
Constructor and Description |
---|
IdTokenLoginHandler(JwtCookieConfiguration jwtCookieConfiguration,
RedirectConfiguration redirectConfiguration,
TokenConfiguration tokenConfiguration,
PriorToLoginPersistence priorToLoginPersistence) |
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
public IdTokenLoginHandler(JwtCookieConfiguration jwtCookieConfiguration, 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