@Singleton public class SessionLoginHandler extends java.lang.Object implements RedirectingLoginHandler
RedirectingLoginHandler
implementation for session based authentication.Modifier and Type | Field and Description |
---|---|
protected SecuritySessionConfiguration |
securitySessionConfiguration |
protected io.micronaut.session.SessionStore<io.micronaut.session.Session> |
sessionStore |
Constructor and Description |
---|
SessionLoginHandler(SecuritySessionConfiguration securitySessionConfiguration,
io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore)
|
SessionLoginHandler(SecuritySessionConfiguration securitySessionConfiguration,
io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore,
TokenConfiguration tokenConfiguration)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.http.HttpResponse |
loginFailed(AuthenticationFailed authenticationFailed) |
io.micronaut.http.HttpResponse |
loginSuccess(UserDetails userDetails,
io.micronaut.http.HttpRequest<?> request) |
protected final io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore
protected final SecuritySessionConfiguration securitySessionConfiguration
@Deprecated public SessionLoginHandler(SecuritySessionConfiguration securitySessionConfiguration, io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore)
securitySessionConfiguration
- Security Session ConfigurationsessionStore
- The session store@Inject public SessionLoginHandler(SecuritySessionConfiguration securitySessionConfiguration, io.micronaut.session.SessionStore<io.micronaut.session.Session> sessionStore, TokenConfiguration tokenConfiguration)
securitySessionConfiguration
- Security Session ConfigurationsessionStore
- The session storetokenConfiguration
- Token Configurationpublic io.micronaut.http.HttpResponse 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.HttpResponse loginFailed(AuthenticationFailed authenticationFailed)
loginFailed
in interface LoginHandler
authenticationFailed
- Object encapsulates the Login failure