Interface LoginHandler<I,O>

Type Parameters:
I - Request
O - Response
All Known Subinterfaces:
RedirectingLoginHandler<I,O>
All Known Implementing Classes:
AccessRefreshTokenLoginHandler, CookieLoginHandler, IdTokenLoginHandler, SessionLoginHandler, TokenCookieLoginHandler

public interface LoginHandler<I,O>
Defines how to respond to a successful or failed login attempt.
Since:
1.0
Author:
Sergio del Amo
  • Method Details

    • loginSuccess

      O loginSuccess(Authentication authentication, I request)
      Parameters:
      authentication - Authenticated user's representation.
      request - The HTTP Request being executed
      Returns:
      An HTTP Response. Eg. a redirect or an JWT token rendered to the response
    • loginRefresh

      O loginRefresh(Authentication authentication, String refreshToken, I request)
      Parameters:
      authentication - Authenticated user's representation.
      refreshToken - The refresh token
      request - The HTTP Request being executed
      Returns:
      An HTTP Response. Eg. a redirect or an JWT token rendered to the response
    • loginFailed

      O loginFailed(AuthenticationResponse authenticationResponse, I request)
      Parameters:
      authenticationResponse - Object encapsulates the Login failure
      request - The HTTP Request being executed
      Returns:
      An HTTP Response. Eg. a redirect or 401 response