org.keycloak.storage.openshift

## Class OpenshiftSAClientAdapter

- java.lang.Object
- - org.keycloak.storage.client.UnsupportedOperationsClientStorageAdapter
  - - org.keycloak.storage.client.AbstractClientStorageAdapter
    - - org.keycloak.storage.client.AbstractReadOnlyClientStorageAdapter
      - - org.keycloak.storage.openshift.OpenshiftSAClientAdapter

- All Implemented Interfaces:
    ClientModel, ClientScopeModel, OrderedModel, ProtocolMapperContainerModel, RoleContainerModel, ScopeContainerModel

      public final class OpenshiftSAClientAdapter
      extends AbstractReadOnlyClientStorageAdapter

  Author:
    Pedro Igor

- - ### Nested Class Summary

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

      `ClientModel.ClientCreationEvent, ClientModel.ClientProtocolUpdatedEvent, ClientModel.ClientRemovedEvent, ClientModel.ClientUpdatedEvent, ClientModel.SearchableFields`

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

      `ClientScopeModel.ClientScopeRemovedEvent`

    - ### 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 inherited from class org.keycloak.storage.client.AbstractClientStorageAdapter

      `component, realm, 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
    `OpenshiftSAClientAdapter(String clientId, com.openshift.restclient.model.IResource resource, com.openshift.restclient.IClient client, KeycloakSession session, RealmModel realm, ClientStorageProviderModel component)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getAttribute(String name)`
    `Map<String,String>` | `getAttributes()`
    `String` | `getAuthenticationFlowBindingOverride(String binding)` Get authentication flow binding override for this client.
    `Map<String,String>` | `getAuthenticationFlowBindingOverrides()`
    `String` | `getBaseUrl()`
    `String` | `getClientAuthenticatorType()`
    `String` | `getClientId()` Returns client ID as defined by the user.
    `Map<String,ClientScopeModel>` | `getClientScopes(boolean defaultScope)` Return all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this client
    `String` | `getDescription()`
    `ClientScopeModel` | `getDynamicClientScope(String scope)` Returns a `ClientScopeModel` associated with this client.
    `String` | `getManagementUrl()`
    `String` | `getName()`
    `int` | `getNodeReRegistrationTimeout()`
    `int` | `getNotBefore()` Time in seconds since epoc
    `String` | `getProtocol()`
    `ProtocolMapperModel` | `getProtocolMapperById(String id)`
    `ProtocolMapperModel` | `getProtocolMapperByName(String protocol, String name)`
    `Stream<ProtocolMapperModel>` | `getProtocolMappersStream()` Returns protocol mappers as a stream.
    `Stream<RoleModel>` | `getRealmScopeMappingsStream()` From the scope mappings returned by `ScopeContainerModel.getScopeMappingsStream()` returns only those that belong to the realm that owns this scope container.
    `Set<String>` | `getRedirectUris()`
    `String` | `getRegistrationToken()`
    `String` | `getRootUrl()`
    `Stream<RoleModel>` | `getScopeMappingsStream()` Returns scope mappings for this scope container as a stream.
    `String` | `getSecret()`
    `Set<String>` | `getWebOrigins()`
    `boolean` | `hasScope(RoleModel role)`
    `boolean` | `isAlwaysDisplayInConsole()`
    `boolean` | `isBearerOnly()`
    `boolean` | `isConsentRequired()`
    `boolean` | `isDirectAccessGrantsEnabled()`
    `boolean` | `isDisplayOnConsentScreen()`
    `boolean` | `isEnabled()`
    `boolean` | `isFrontchannelLogout()`
    `boolean` | `isFullScopeAllowed()`
    `boolean` | `isImplicitFlowEnabled()`
    `boolean` | `isPublicClient()`
    `boolean` | `isServiceAccountsEnabled()`
    `boolean` | `isStandardFlowEnabled()`
    `boolean` | `validateSecret(String secret)`

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

      `addClientScope, addClientScopes, addProtocolMapper, addRedirectUri, addScopeMapping, addWebOrigin, deleteScopeMapping, removeAttribute, removeAuthenticationFlowBindingOverride, removeClientScope, removeProtocolMapper, 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, updateProtocolMapper`

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

      `getId, getRealm, getRegisteredNodes, isSurrogateAuthRequired, registerNode, setSurrogateAuthRequired, unregisterNode, updateClient`

    - ### 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

      `getConsentScreenText`

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

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

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

      `getProtocolMappers`

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

      `getRealmScopeMappings, getScopeMappings`

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

      `getDefaultRoles, getRoles, getRoles, searchForRoles`

- - ### Constructor Detail

    - #### OpenshiftSAClientAdapter

          public OpenshiftSAClientAdapter(String clientId,
                                          com.openshift.restclient.model.IResource resource,
                                          com.openshift.restclient.IClient client,
                                          KeycloakSession session,
                                          RealmModel realm,
                                          ClientStorageProviderModel component)

  - ### Method Detail

    - #### getClientId

          public String getClientId()

      Description copied from interface: `ClientModel`
      Returns client ID as defined by the user.
      Returns:

    - #### getName

          public String getName()

    - #### getDescription

          public String getDescription()

    - #### isEnabled

          public boolean isEnabled()

    - #### isAlwaysDisplayInConsole

          public boolean isAlwaysDisplayInConsole()

    - #### getWebOrigins

          public Set<String> getWebOrigins()

    - #### getRedirectUris

          public Set<String> getRedirectUris()

    - #### getManagementUrl

          public String getManagementUrl()

    - #### getRootUrl

          public String getRootUrl()

    - #### getBaseUrl

          public String getBaseUrl()

    - #### isBearerOnly

          public boolean isBearerOnly()

    - #### getNodeReRegistrationTimeout

          public int getNodeReRegistrationTimeout()

    - #### getClientAuthenticatorType

          public String getClientAuthenticatorType()

    - #### validateSecret

          public boolean validateSecret(String secret)

    - #### getSecret

          public String getSecret()

    - #### getRegistrationToken

          public String getRegistrationToken()

    - #### getProtocol

          public String getProtocol()

    - #### getAttribute

          public String getAttribute(String name)

    - #### getAttributes

          public Map<String,String> getAttributes()

    - #### getAuthenticationFlowBindingOverride

          public String getAuthenticationFlowBindingOverride(String binding)

      Description copied from interface: `ClientModel`
      Get authentication flow binding override for this client. Allows client to override an authentication flow binding.
      Parameters:
        `binding` - examples are "browser", "direct_grant"
      Returns:

    - #### getAuthenticationFlowBindingOverrides

          public Map<String,String> getAuthenticationFlowBindingOverrides()

    - #### isFrontchannelLogout

          public boolean isFrontchannelLogout()

    - #### isFullScopeAllowed

          public boolean isFullScopeAllowed()

    - #### isPublicClient

          public boolean isPublicClient()

    - #### isConsentRequired

          public boolean isConsentRequired()

    - #### isDisplayOnConsentScreen

          public boolean isDisplayOnConsentScreen()

    - #### isStandardFlowEnabled

          public boolean isStandardFlowEnabled()

    - #### isImplicitFlowEnabled

          public boolean isImplicitFlowEnabled()

    - #### isDirectAccessGrantsEnabled

          public boolean isDirectAccessGrantsEnabled()

    - #### isServiceAccountsEnabled

          public boolean isServiceAccountsEnabled()

    - #### getClientScopes

          public Map<String,ClientScopeModel> getClientScopes(boolean defaultScope)

      Description copied from interface: `ClientModel`
      Return all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this client
      Returns:
        map where key is the name of the clientScope, value is particular clientScope. Returns empty map if no scopes linked (never returns null).

    - #### getDynamicClientScope

          public ClientScopeModel getDynamicClientScope(String scope)

      Description copied from interface: `ClientModel`

      Returns a `ClientScopeModel` associated with this client.

      This method is used as a fallback in order to let clients to resolve a `scope` dynamically which is not listed as default or optional scope when calling `#getClientScopes(boolean, boolean)`.

      Parameters:
        `scope` - the scope name
      Returns:
        the client scope

    - #### getNotBefore

          public int getNotBefore()

      Description copied from interface: `ClientModel`
      Time in seconds since epoc
      Returns:

    - #### getProtocolMappersStream

          public Stream<ProtocolMapperModel> getProtocolMappersStream()

      Description copied from interface: `ProtocolMapperContainerModel`
      Returns protocol mappers as a stream.
      Returns:
        Stream of protocol mapper. Never returns `null`.

    - #### getProtocolMapperById

          public ProtocolMapperModel getProtocolMapperById(String id)

    - #### getProtocolMapperByName

          public ProtocolMapperModel getProtocolMapperByName(String protocol,
                                                             String name)

    - #### getScopeMappingsStream

          public Stream<RoleModel> getScopeMappingsStream()

      Description copied from interface: `ScopeContainerModel`
      Returns scope mappings for this scope container as a stream.
      Returns:
        Stream of `RoleModel`. Never returns `null`.

    - #### getRealmScopeMappingsStream

          public Stream<RoleModel> getRealmScopeMappingsStream()

      Description copied from interface: `ScopeContainerModel`
      From the scope mappings returned by `ScopeContainerModel.getScopeMappingsStream()` returns only those that belong to the realm that owns this scope container.
      Returns:
        stream of `RoleModel`. Never returns `null`.

    - #### hasScope

          public boolean hasScope(RoleModel role)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

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