org.keycloak.services.clientregistration.policy

## Class AbstractClientRegistrationPolicyFactory

- java.lang.Object
- - org.keycloak.services.clientregistration.policy.AbstractClientRegistrationPolicyFactory

- All Implemented Interfaces:
    ComponentFactory<ClientRegistrationPolicy,ClientRegistrationPolicy>, ConfiguredProvider, ProviderFactory<ClientRegistrationPolicy>, ClientRegistrationPolicyFactory
  Direct Known Subclasses:
    ClientDisabledClientRegistrationPolicyFactory, ClientScopesClientRegistrationPolicyFactory, ConsentRequiredClientRegistrationPolicyFactory, MaxClientsClientRegistrationPolicyFactory, ProtocolMappersClientRegistrationPolicyFactory, ScopeClientRegistrationPolicyFactory, TrustedHostClientRegistrationPolicyFactory

      public abstract class AbstractClientRegistrationPolicyFactory
      extends Object
      implements ClientRegistrationPolicyFactory

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected KeycloakSessionFactory` | `sessionFactory`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractClientRegistrationPolicyFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` This is called when the server shuts down.
    `List<ProviderConfigProperty>` | `getConfigProperties(KeycloakSession session)` Get config properties filled for particular session.
    `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
    `void` | `validateConfiguration(KeycloakSession session, RealmModel realm, ComponentModel config)` Called before a component is created or updated.

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

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

    - ### Methods inherited from interface org.keycloak.component.ComponentFactory

      `create, create, getCommonProviderConfigProperties, getTypeMetadata, onCreate, onUpdate, preRemove`

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

      `getId, order`

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

      `getConfigProperties, getHelpText`

- - ### Field Detail

    - #### sessionFactory

          protected KeycloakSessionFactory sessionFactory

  - ### Constructor Detail

    - #### AbstractClientRegistrationPolicyFactory

          public AbstractClientRegistrationPolicyFactory()

  - ### Method Detail

    - #### 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<ClientRegistrationPolicy>`

    - #### 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<ClientRegistrationPolicy>`

    - #### close

          public void close()

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

    - #### validateConfiguration

          public void validateConfiguration(KeycloakSession session,
                                            RealmModel realm,
                                            ComponentModel config)
                                     throws ComponentValidationException

      Description copied from interface: `ComponentFactory`
      Called before a component is created or updated. Allows you to validate the configuration
      Specified by:
        `validateConfiguration` in interface `ComponentFactory<ClientRegistrationPolicy,ClientRegistrationPolicy>`
      Throws:
        `ComponentValidationException`

    - #### getConfigProperties

          public List<ProviderConfigProperty> getConfigProperties(KeycloakSession session)

      Description copied from interface: `ClientRegistrationPolicyFactory`
      Get config properties filled for particular session. It assumes the session.getContext() has set realm
      Specified by:
        `getConfigProperties` in interface `ClientRegistrationPolicyFactory`
      Returns:

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