@Requires(condition=SessionAuthenticationModeCondition.class) @Singleton public class SessionLoginHandler extends java.lang.Object implements RedirectingLoginHandler
RedirectingLoginHandler
implementation for session based authentication.Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
loginFailure |
protected java.lang.String |
loginSuccess |
protected RedirectConfiguration |
redirectConfiguration |
protected io.micronaut.session.SessionStore<io.micronaut.session.Session> |
sessionStore |
Constructor and Description |
---|
SessionLoginHandler(RedirectConfiguration redirectConfiguration,
io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore,
PriorToLoginPersistence priorToLoginPersistence)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.http.MutableHttpResponse<?> |
loginFailed(AuthenticationResponse authenticationFailed,
io.micronaut.http.HttpRequest<?> request) |
io.micronaut.http.MutableHttpResponse<?> |
loginRefresh(Authentication authentication,
java.lang.String refreshToken,
io.micronaut.http.HttpRequest<?> request) |
io.micronaut.http.MutableHttpResponse<?> |
loginSuccess(Authentication authentication,
io.micronaut.http.HttpRequest<?> request) |
protected final java.lang.String loginSuccess
protected final java.lang.String loginFailure
protected final RedirectConfiguration redirectConfiguration
protected final io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore
public SessionLoginHandler(RedirectConfiguration redirectConfiguration, io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore, @Nullable PriorToLoginPersistence priorToLoginPersistence)
redirectConfiguration
- Redirect configurationsessionStore
- The session storepriorToLoginPersistence
- The persistence to store the original urlpublic io.micronaut.http.MutableHttpResponse<?> loginSuccess(Authentication authentication, io.micronaut.http.HttpRequest<?> request)
loginSuccess
in interface LoginHandler
authentication
- Authenticated user's representation.request
- The HttpRequest
being executedpublic io.micronaut.http.MutableHttpResponse<?> loginRefresh(Authentication authentication, java.lang.String refreshToken, io.micronaut.http.HttpRequest<?> request)
loginRefresh
in interface LoginHandler
authentication
- Authenticated user's representation.refreshToken
- The refresh tokenrequest
- The HttpRequest
being executedpublic io.micronaut.http.MutableHttpResponse<?> loginFailed(AuthenticationResponse authenticationFailed, io.micronaut.http.HttpRequest<?> request)
loginFailed
in interface LoginHandler
authenticationFailed
- Object encapsulates the Login failurerequest
- The HttpRequest
being executed