Class LoginActionHandler<A extends LoginCredentials,B extends Authentication,C extends io.inverno.mod.http.base.ExchangeContext,D extends Exchange<C>>

java.lang.Object
io.inverno.mod.security.http.login.LoginActionHandler<A,B,C,D>
Type Parameters:
A - the login credentials type
B - the authentication type
C - the context type
D - the exchange type
All Implemented Interfaces:
ExchangeHandler<C,D>, ReactiveExchangeHandler<C,D>

public class LoginActionHandler<A extends LoginCredentials,B extends Authentication,C extends io.inverno.mod.http.base.ExchangeContext,D extends Exchange<C>> extends Object implements ExchangeHandler<C,D>

An exchange handler that authenticates login credentials and delegates further processing to success and failure handlers.

A login action handler is typically used in a form login authentication to authenticate the credentials sent by a user in a POST request.

It relies on a CredentialsExtractor to extract login credentials from the request, an Authenticator to authenticate them, a LoginSuccessHandler and a LoginFailureHandler to respectively handle successful authentications and failed authentications.

Since:
1.5
Author:
Jeremy Kuhn
  • Constructor Details

    • LoginActionHandler

      public LoginActionHandler(CredentialsExtractor<A> credentialsExtractor, Authenticator<A,B> authenticator)

      Creates a login action handler with the specified credentials extractor and authenticator.

      Parameters:
      credentialsExtractor - a credentials extractor
      authenticator - an authenticator
    • LoginActionHandler

      public LoginActionHandler(CredentialsExtractor<A> credentialsExtractor, Authenticator<A,B> authenticator, LoginSuccessHandler<B,C,D> loginSuccessHandler, LoginFailureHandler<C,D> loginFailureHandler)

      Creates a login action handler with the specified credentials extractor, authenticator, login success handler and login failure handler.

      Parameters:
      credentialsExtractor - a credentials extractor
      authenticator - an authenticator
      loginSuccessHandler - a login success handler
      loginFailureHandler - a login failure handler
  • Method Details