@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,
TokenConfiguration tokenConfiguration,
PriorToLoginPersistence priorToLoginPersistence)
Constructor.
|
SessionLoginHandler(SecuritySessionConfiguration securitySessionConfiguration,
io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore,
TokenConfiguration tokenConfiguration)
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.http.MutableHttpResponse<?> |
loginFailed(AuthenticationResponse authenticationFailed,
io.micronaut.http.HttpRequest<?> request) |
io.micronaut.http.MutableHttpResponse<?> |
loginRefresh(UserDetails userDetails,
java.lang.String refreshToken,
io.micronaut.http.HttpRequest<?> request) |
io.micronaut.http.MutableHttpResponse<?> |
loginSuccess(UserDetails userDetails,
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
@Deprecated public SessionLoginHandler(SecuritySessionConfiguration securitySessionConfiguration, io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore, TokenConfiguration tokenConfiguration)
SessionLoginHandler(RedirectConfiguration, SessionStore, TokenConfiguration, PriorToLoginPersistence)
instead.securitySessionConfiguration
- Security Session ConfigurationsessionStore
- The session storetokenConfiguration
- Token Configuration@Inject public SessionLoginHandler(RedirectConfiguration redirectConfiguration, io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore, TokenConfiguration tokenConfiguration, @Nullable PriorToLoginPersistence priorToLoginPersistence)
redirectConfiguration
- Redirect configurationsessionStore
- The session storetokenConfiguration
- Token ConfigurationpriorToLoginPersistence
- The persistence to store the original urlpublic io.micronaut.http.MutableHttpResponse<?> loginSuccess(UserDetails userDetails, io.micronaut.http.HttpRequest<?> request)
loginSuccess
in interface LoginHandler
userDetails
- Authenticated user's representation.request
- The HttpRequest
being executedpublic io.micronaut.http.MutableHttpResponse<?> loginRefresh(UserDetails userDetails, java.lang.String refreshToken, io.micronaut.http.HttpRequest<?> request)
loginRefresh
in interface LoginHandler
userDetails
- 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