Interface FormAction

All Superinterfaces:
Provider
All Known Implementing Classes:
RegistrationPassword, RegistrationRecaptcha, RegistrationTermsAndConditions, RegistrationUserCreation

public interface FormAction extends Provider
Fine grain processing of a form. Allows you to split up the processing of a form into smaller parts so that you can enable/disable them from the admin console. For example, Recaptcha is a FormAction. This allows you as the admin to turn Recaptcha on/off even though it is on the same form/page as other registration validation.
Version:
$Revision: 1 $
Author:
Bill Burke
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    When a FormAuthenticator is rendering the challenge page, even FormAction.buildPage() method will be called This gives the FormAction the opportunity to add additional attributes to the form to be displayed.
    boolean
    Is this FormAction configured for the current user?
    boolean
    Does this FormAction require that a user be set? For registration, this method will always return false.
    void
    Set actions to configure authenticator
    void
    Called after all validate() calls of all FormAction providers are successful.
    void
    This is the first phase of form processing.

    Methods inherited from interface org.keycloak.provider.Provider

    close
  • Method Details

    • buildPage

      void buildPage(FormContext context, LoginFormsProvider form)
      When a FormAuthenticator is rendering the challenge page, even FormAction.buildPage() method will be called This gives the FormAction the opportunity to add additional attributes to the form to be displayed.
      Parameters:
      context -
      form -
    • validate

      void validate(ValidationContext context)
      This is the first phase of form processing. Each FormAction.validate() method is called. This gives the FormAction a chance to validate and challenge if user input is invalid.
      Parameters:
      context -
    • success

      void success(FormContext context)
      Called after all validate() calls of all FormAction providers are successful.
      Parameters:
      context -
    • requiresUser

      boolean requiresUser()
      Does this FormAction require that a user be set? For registration, this method will always return false.
      Returns:
    • configuredFor

      boolean configuredFor(KeycloakSession session, RealmModel realm, UserModel user)
      Is this FormAction configured for the current user?
      Parameters:
      session -
      realm -
      user -
      Returns:
    • setRequiredActions

      void setRequiredActions(KeycloakSession session, RealmModel realm, UserModel user)
      Set actions to configure authenticator