Class AccessRefreshTokenLoginHandler
- java.lang.Object
-
- io.micronaut.security.token.jwt.bearer.AccessRefreshTokenLoginHandler
-
- All Implemented Interfaces:
LoginHandler
@Requires(property="micronaut.security.token.jwt.bearer.enabled", notEquals="false") @Primary @Singleton public class AccessRefreshTokenLoginHandler extends java.lang.Object implements LoginHandlerImplementation ofLoginHandlerfor Token Based Authentication.- Since:
- 1.0
- Author:
- Sergio del Amo
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessRefreshTokenGeneratoraccessRefreshTokenGenerator
-
Constructor Summary
Constructors Constructor Description AccessRefreshTokenLoginHandler(AccessRefreshTokenGenerator accessRefreshTokenGenerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.micronaut.http.HttpResponseloginFailed(AuthenticationFailed authenticationFailed)io.micronaut.http.HttpResponseloginSuccess(UserDetails userDetails, io.micronaut.http.HttpRequest<?> request)
-
-
-
Field Detail
-
accessRefreshTokenGenerator
protected final AccessRefreshTokenGenerator accessRefreshTokenGenerator
-
-
Constructor Detail
-
AccessRefreshTokenLoginHandler
public AccessRefreshTokenLoginHandler(AccessRefreshTokenGenerator accessRefreshTokenGenerator)
- Parameters:
accessRefreshTokenGenerator- AccessRefresh Token generator
-
-
Method Detail
-
loginSuccess
public io.micronaut.http.HttpResponse loginSuccess(UserDetails userDetails, io.micronaut.http.HttpRequest<?> request)
- Specified by:
loginSuccessin interfaceLoginHandler- Parameters:
userDetails- Authenticated user's representation.request- TheHttpRequestbeing executed- Returns:
- An HTTP Response. Eg. a redirect or an JWT token rendered to the response
-
loginFailed
public io.micronaut.http.HttpResponse loginFailed(AuthenticationFailed authenticationFailed)
- Specified by:
loginFailedin interfaceLoginHandler- Parameters:
authenticationFailed- Object encapsulates the Login failure- Returns:
- An HTTP Response. Eg. a redirect or 401 response
-
-