Class AxelorAuthenticator

java.lang.Object
com.axelor.auth.pac4j.local.AxelorAuthenticator
All Implemented Interfaces:
org.pac4j.core.credentials.authenticator.Authenticator

public class AxelorAuthenticator extends Object implements org.pac4j.core.credentials.authenticator.Authenticator
Authenticator implementation for local username/password authentication.

This is the default authenticator used by the form and basic auth clients. It may also be called outside the Pac4j flow, in which case the CallContext is null.

It also drives the password change flow: a user flagged with force password change must submit a new password, and a submitted new password is stored only after it passes the password policies.

  • Field Details

  • Constructor Details

    • AxelorAuthenticator

      public AxelorAuthenticator()
  • Method Details

    • validate

      public Optional<org.pac4j.core.credentials.Credentials> validate(org.pac4j.core.context.CallContext ctx, org.pac4j.core.credentials.Credentials inputCredentials)
      Specified by:
      validate in interface org.pac4j.core.credentials.authenticator.Authenticator
    • validateUser

      protected User validateUser(String username, String password, boolean passwordChangeRequest)
      Finds the user matching the given credentials.
      Parameters:
      username - the username
      password - the current password
      passwordChangeRequest - whether the user is changing their password
      Returns:
      the matching active user
      Throws:
      org.pac4j.core.exception.CredentialsException - if the credentials are incomplete or don't match an active user