Class RedirectLoginSuccessHandler<A extends Authentication,B extends ExchangeContext,C extends Exchange<B>>

java.lang.Object
io.inverno.mod.security.http.form.RedirectLoginSuccessHandler<A,B,C>
Type Parameters:
A - the authentication type
B - the context type
C - the exchange type
All Implemented Interfaces:
LoginSuccessHandler<A,B,C>

public class RedirectLoginSuccessHandler<A extends Authentication,B extends ExchangeContext,C extends Exchange<B>> extends Object implements LoginSuccessHandler<A,B,C>

A login success handler implementation that redirects the client (302) after a successful login authentication.

Since:
1.5
Author:
Jeremy Kuhn
See Also:
  • Field Details

    • DEFAULT_LOGIN_SUCCESS_URI

      public static final String DEFAULT_LOGIN_SUCCESS_URI
      The default login success URI: /.
      See Also:
  • Constructor Details

    • RedirectLoginSuccessHandler

      public RedirectLoginSuccessHandler()

      Creates a redirect login success handler which redirects the client to the default login success URI.

    • RedirectLoginSuccessHandler

      public RedirectLoginSuccessHandler(String loginSuccessUri)

      Creates a redirect login success handler which redirects the client to the specified login success URI.

      Parameters:
      loginSuccessUri - the URI where to redirect the client after a successful login authentication
  • Method Details

    • getLoginSuccessUri

      public String getLoginSuccessUri()

      Returns the URI where the client is redirected after a successful login authentication.

      Returns:
      the login success URI
    • handleLoginSuccess

      public Mono<Void> handleLoginSuccess(C exchange, A authentication)
      Description copied from interface: LoginSuccessHandler

      Handles successful authentication.

      Specified by:
      handleLoginSuccess in interface LoginSuccessHandler<A extends Authentication,B extends ExchangeContext,C extends Exchange<B>>
      Parameters:
      exchange - the exchange
      authentication - the authentication resulting from the authentication process
      Returns:
      a mono which completes when the authentication has been handled