org.keycloak.storage.client

## Class AbstractClientStorageAdapter

- java.lang.Object
- - org.keycloak.storage.client.UnsupportedOperationsClientStorageAdapter
  - - org.keycloak.storage.client.AbstractClientStorageAdapter

- All Implemented Interfaces:
    ClientModel, ClientScopeModel, OrderedModel, ProtocolMapperContainerModel, RoleContainerModel, ScopeContainerModel
  Direct Known Subclasses:
    AbstractReadOnlyClientStorageAdapter

      public abstract class AbstractClientStorageAdapter
      extends UnsupportedOperationsClientStorageAdapter

  Helper base class for ClientModel implementations for ClientStorageProvider implementations. Contains default implementations of some methods
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.ClientModel

      `ClientModel.ClientCreationEvent, ClientModel.ClientRemovedEvent, ClientModel.ClientUpdatedEvent`

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.OrderedModel

      `OrderedModel.OrderedModelComparator<OM extends OrderedModel>`

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.RoleContainerModel

      `RoleContainerModel.RoleRemovedEvent`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ClientStorageProviderModel` | `component`
    `protected RealmModel` | `realm`
    `protected KeycloakSession` | `session`

    - ### Fields inherited from interface org.keycloak.models.ClientModel

      `PRIVATE_KEY, PUBLIC_KEY, X509CERTIFICATE`

    - ### Fields inherited from interface org.keycloak.models.ClientScopeModel

      `CONSENT_SCREEN_TEXT, DISPLAY_ON_CONSENT_SCREEN, GUI_ORDER, INCLUDE_IN_TOKEN_SCOPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractClientStorageAdapter(KeycloakSession session, RealmModel realm, ClientStorageProviderModel component)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getId()` Creates federated id based on getClientId() method
    `RealmModel` | `getRealm()`
    `Map<String,Integer>` | `getRegisteredNodes()` This is for logout.
    `boolean` | `isSurrogateAuthRequired()` This method really isn't used by anybody anywhere.
    `void` | `registerNode(String nodeHost, int registrationTime)` This is for logout.
    `void` | `setSurrogateAuthRequired(boolean surrogateAuthRequired)` This method really isn't used by anybody anywhere.
    `void` | `unregisterNode(String nodeHost)` This is for logout.
    `void` | `updateClient()` Overriding implementations should call super.updateClient() as this fires off an update event.

    - ### Methods inherited from class org.keycloak.storage.client.UnsupportedOperationsClientStorageAdapter

      `addDefaultRole, addRole, addRole, getDefaultRolesStream, getRole, getRolesStream, getRolesStream, removeDefaultRoles, removeRole, searchForRolesStream, updateDefaultRoles`

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

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

    - ### Methods inherited from interface org.keycloak.models.ClientModel

      `addClientScope, addClientScopes, addRedirectUri, addWebOrigin, getAttribute, getAttributes, getAuthenticationFlowBindingOverride, getAuthenticationFlowBindingOverrides, getBaseUrl, getClientAuthenticatorType, getClientId, getClientScopes, getConsentScreenText, getDescription, getDynamicClientScope, getManagementUrl, getName, getNodeReRegistrationTimeout, getNotBefore, getProtocol, getRedirectUris, getRegistrationToken, getRootUrl, getSecret, getWebOrigins, isAlwaysDisplayInConsole, isBearerOnly, isConsentRequired, isDirectAccessGrantsEnabled, isDisplayOnConsentScreen, isEnabled, isFrontchannelLogout, isFullScopeAllowed, isImplicitFlowEnabled, isPublicClient, isServiceAccountsEnabled, isStandardFlowEnabled, removeAttribute, removeAuthenticationFlowBindingOverride, removeClientScope, removeRedirectUri, removeWebOrigin, setAlwaysDisplayInConsole, setAttribute, setAuthenticationFlowBindingOverride, setBaseUrl, setBearerOnly, setClientAuthenticatorType, setClientId, setConsentRequired, setDescription, setDirectAccessGrantsEnabled, setEnabled, setFrontchannelLogout, setFullScopeAllowed, setImplicitFlowEnabled, setManagementUrl, setName, setNodeReRegistrationTimeout, setNotBefore, setProtocol, setPublicClient, setRedirectUris, setRegistrationToken, setRootUrl, setSecret, setServiceAccountsEnabled, setStandardFlowEnabled, setWebOrigins, validateSecret`

    - ### Methods inherited from interface org.keycloak.models.ClientScopeModel

      `getGuiOrder, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope`

    - ### Methods inherited from interface org.keycloak.models.ProtocolMapperContainerModel

      `addProtocolMapper, getProtocolMapperById, getProtocolMapperByName, getProtocolMappers, getProtocolMappersStream, removeProtocolMapper, updateProtocolMapper`

    - ### Methods inherited from interface org.keycloak.models.ScopeContainerModel

      `addScopeMapping, deleteScopeMapping, getRealmScopeMappings, getRealmScopeMappingsStream, getScopeMappings, getScopeMappingsStream, hasScope`

    - ### Methods inherited from interface org.keycloak.models.RoleContainerModel

      `getDefaultRoles, getRoles, getRoles, searchForRoles`

- - ### Field Detail

    - #### session

          protected KeycloakSession session

    - #### realm

          protected RealmModel realm

    - #### component

          protected ClientStorageProviderModel component

  - ### Constructor Detail

    - #### AbstractClientStorageAdapter

          public AbstractClientStorageAdapter(KeycloakSession session,
                                              RealmModel realm,
                                              ClientStorageProviderModel component)

  - ### Method Detail

    - #### getId

          public String getId()

      Creates federated id based on getClientId() method
      Returns:

    - #### getRealm

          public final RealmModel getRealm()

    - #### isSurrogateAuthRequired

          public boolean isSurrogateAuthRequired()

      This method really isn't used by anybody anywhere. Legacy feature never supported.
      Returns:

    - #### setSurrogateAuthRequired

          public void setSurrogateAuthRequired(boolean surrogateAuthRequired)

      This method really isn't used by anybody anywhere. Legacy feature never supported.

    - #### getRegisteredNodes

          public Map<String,Integer> getRegisteredNodes()

      This is for logout. Empty implementation for now. Can override if you can store this information somewhere.
      Returns:

    - #### registerNode

          public void registerNode(String nodeHost,
                                   int registrationTime)

      This is for logout. Empty implementation for now. Can override if you can store this information somewhere.

    - #### unregisterNode

          public void unregisterNode(String nodeHost)

      This is for logout. Empty implementation for now. Can override if you can store this information somewhere.

    - #### updateClient

          public void updateClient()

      Overriding implementations should call super.updateClient() as this fires off an update event.
      See Also:
        `ProviderEvent`, `ProviderEventManager`, `ClientModel.ClientUpdatedEvent`

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