org.keycloak.authentication.authenticators.directgrant

## Class AbstractDirectGrantAuthenticator

- java.lang.Object
- - org.keycloak.authentication.authenticators.directgrant.AbstractDirectGrantAuthenticator

- All Implemented Interfaces:
    Authenticator, AuthenticatorFactory, ConfigurableAuthenticatorFactory, ConfiguredProvider, Provider, ProviderFactory<Authenticator>
  Direct Known Subclasses:
    ValidateOTP, ValidatePassword, ValidateUsername

      public abstract class AbstractDirectGrantAuthenticator
      extends Object
      implements Authenticator, AuthenticatorFactory

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractDirectGrantAuthenticator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `action(AuthenticationFlowContext context)` Called from a form action invocation.
    `void` | `close()` This is called when the server shuts down.
    `Authenticator` | `create(KeycloakSession session)`
    `javax.ws.rs.core.Response` | `errorResponse(int status, String error, String errorDescription)`
    `void` | `init(Config.Scope config)` Only called once when the factory is first created.
    `void` | `postInit(KeycloakSessionFactory factory)` Called after all provider factories have been initialized

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.keycloak.authentication.Authenticator

      `authenticate, configuredFor, requiresUser, setRequiredActions`

    - ### Methods inherited from interface org.keycloak.provider.ProviderFactory

      `getId`

    - ### Methods inherited from interface org.keycloak.authentication.ConfigurableAuthenticatorFactory

      `getDisplayType, getReferenceCategory, getRequirementChoices, isConfigurable, isUserSetupAllowed`

    - ### Methods inherited from interface org.keycloak.provider.ConfiguredProvider

      `getConfigProperties, getHelpText`

- - ### Constructor Detail

    - #### AbstractDirectGrantAuthenticator

          public AbstractDirectGrantAuthenticator()

  - ### Method Detail

    - #### errorResponse

          public javax.ws.rs.core.Response errorResponse(int status,
                                                         String error,
                                                         String errorDescription)

    - #### action

          public void action(AuthenticationFlowContext context)

      Description copied from interface: `Authenticator`
      Called from a form action invocation.
      Specified by:
        `action` in interface `Authenticator`

    - #### close

          public void close()

      Description copied from interface: `ProviderFactory`
      This is called when the server shuts down.
      Specified by:
        `close` in interface `Provider`
      Specified by:
        `close` in interface `ProviderFactory<Authenticator>`

    - #### create

          public Authenticator create(KeycloakSession session)

      Specified by:
        `create` in interface `ProviderFactory<Authenticator>`

    - #### init

          public void init(Config.Scope config)

      Description copied from interface: `ProviderFactory`
      Only called once when the factory is first created. This config is pulled from keycloak_server.json
      Specified by:
        `init` in interface `ProviderFactory<Authenticator>`

    - #### postInit

          public void postInit(KeycloakSessionFactory factory)

      Description copied from interface: `ProviderFactory`
      Called after all provider factories have been initialized
      Specified by:
        `postInit` in interface `ProviderFactory<Authenticator>`

Copyright © 2016 JBoss by Red Hat. All rights reserved.