Class AbstractUsernameFormAuthenticator

java.lang.Object
org.keycloak.authentication.AbstractFormAuthenticator
org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator
All Implemented Interfaces:
org.keycloak.authentication.Authenticator, org.keycloak.provider.Provider
Direct Known Subclasses:
OTPFormAuthenticator, SpnegoAuthenticator, UsernamePasswordForm

public abstract class AbstractUsernameFormAuthenticator extends AbstractFormAuthenticator
Version:
$Revision: 1 $
Author:
Bill Burke
  • Field Details

    • ATTEMPTED_USERNAME

      public static final String ATTEMPTED_USERNAME
      See Also:
    • USERNAME_HIDDEN

      public static final String USERNAME_HIDDEN
      An authentication session not to indicate that the username field should be hidden. This note is usually set together with ATTEMPTED_USERNAME to indicated that the user can restart the flow by choosing a different username. It should be set by authenticators that happen before this authenticator in the flow so that the original intent is kept when this authenticator is executed on subsequent requests.
      See Also:
    • SESSION_INVALID

      public static final String SESSION_INVALID
      See Also:
    • USER_SET_BEFORE_USERNAME_PASSWORD_AUTH

      public static final String USER_SET_BEFORE_USERNAME_PASSWORD_AUTH
      See Also:
  • Constructor Details

    • AbstractUsernameFormAuthenticator

      public AbstractUsernameFormAuthenticator()
  • Method Details

    • action

      public void action(org.keycloak.authentication.AuthenticationFlowContext context)
    • challenge

      protected jakarta.ws.rs.core.Response challenge(org.keycloak.authentication.AuthenticationFlowContext context, String error)
    • challenge

      protected jakarta.ws.rs.core.Response challenge(org.keycloak.authentication.AuthenticationFlowContext context, String error, String field)
    • createLoginForm

      protected jakarta.ws.rs.core.Response createLoginForm(org.keycloak.forms.login.LoginFormsProvider form)
    • disabledByBruteForceError

      protected String disabledByBruteForceError(String error)
    • disabledByBruteForceFieldError

      protected String disabledByBruteForceFieldError()
    • setDuplicateUserChallenge

      protected jakarta.ws.rs.core.Response setDuplicateUserChallenge(org.keycloak.authentication.AuthenticationFlowContext context, String eventError, String loginFormError, org.keycloak.authentication.AuthenticationFlowError authenticatorError)
    • testInvalidUser

      public void testInvalidUser(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
    • enabledUser

      public boolean enabledUser(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
    • validateUserAndPassword

      public boolean validateUserAndPassword(org.keycloak.authentication.AuthenticationFlowContext context, jakarta.ws.rs.core.MultivaluedMap<String,String> inputData)
    • validateUser

      public boolean validateUser(org.keycloak.authentication.AuthenticationFlowContext context, jakarta.ws.rs.core.MultivaluedMap<String,String> inputData)
    • validatePassword

      public boolean validatePassword(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user, jakarta.ws.rs.core.MultivaluedMap<String,String> inputData, boolean clearUser)
    • isDisabledByBruteForce

      protected boolean isDisabledByBruteForce(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
    • getDefaultChallengeMessage

      protected String getDefaultChallengeMessage(org.keycloak.authentication.AuthenticationFlowContext context)
    • isUserAlreadySetBeforeUsernamePasswordAuth

      protected boolean isUserAlreadySetBeforeUsernamePasswordAuth(org.keycloak.authentication.AuthenticationFlowContext context)