org.keycloak.storage.federated

## Interface UserFederatedUserCredentialStore

- All Superinterfaces:
    Provider
  All Known Subinterfaces:
    UserFederatedStorageProvider, UserFederatedStorageProvider.Streams, UserFederatedUserCredentialStore.Streams
  All Known Implementing Classes:
    JpaUserFederatedStorageProvider

      public interface UserFederatedUserCredentialStore
      extends Provider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `UserFederatedUserCredentialStore.Streams` The `UserFederatedUserCredentialStore.Streams` interface makes all collection-based methods in `UserFederatedUserCredentialStore` default by providing implementations that delegate to the `Stream`-based variants instead of the other way around.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `CredentialModel` | `createCredential(RealmModel realm, String userId, CredentialModel cred)`
    `CredentialModel` | `getStoredCredentialById(RealmModel realm, String userId, String id)`
    `CredentialModel` | `getStoredCredentialByNameAndType(RealmModel realm, String userId, String name, String type)`
    `List<CredentialModel>` | `getStoredCredentials(RealmModel realm, String userId)` Deprecated. Use `getStoredCredentialsStream` instead.
    `List<CredentialModel>` | `getStoredCredentialsByType(RealmModel realm, String userId, String type)` Deprecated. Use `getStoredCredentialsByTypeStream` instead.
    `default Stream<CredentialModel>` | `getStoredCredentialsByTypeStream(RealmModel realm, String userId, String type)` Obtains the credentials of type `type` that are associated with the federated user identified by `userId`.
    `default Stream<CredentialModel>` | `getStoredCredentialsStream(RealmModel realm, String userId)` Obtains the credentials associated with the federated user identified by `userId`.
    `boolean` | `removeStoredCredential(RealmModel realm, String userId, String id)`
    `void` | `updateCredential(RealmModel realm, String userId, CredentialModel cred)`

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

      `close`

- - ### Method Detail

    - #### updateCredential

          void updateCredential(RealmModel realm,
                                String userId,
                                CredentialModel cred)

    - #### createCredential

          CredentialModel createCredential(RealmModel realm,
                                           String userId,
                                           CredentialModel cred)

    - #### removeStoredCredential

          boolean removeStoredCredential(RealmModel realm,
                                         String userId,
                                         String id)

    - #### getStoredCredentialById

          CredentialModel getStoredCredentialById(RealmModel realm,
                                                  String userId,
                                                  String id)

    - #### getStoredCredentials

          @Deprecated
          List<CredentialModel> getStoredCredentials(RealmModel realm,
                                                                 String userId)

      Deprecated. Use `getStoredCredentialsStream` instead.

    - #### getStoredCredentialsStream

          default Stream<CredentialModel> getStoredCredentialsStream(RealmModel realm,
                                                                     String userId)

      Obtains the credentials associated with the federated user identified by `userId`.
      Parameters:
        `realm` - a reference to the realm.
        `userId` - the user identifier.
      Returns:
        a non-null `Stream` of credentials.

    - #### getStoredCredentialsByType

          @Deprecated
          List<CredentialModel> getStoredCredentialsByType(RealmModel realm,
                                                                       String userId,
                                                                       String type)

      Deprecated. Use `getStoredCredentialsByTypeStream` instead.

    - #### getStoredCredentialsByTypeStream

          default Stream<CredentialModel> getStoredCredentialsByTypeStream(RealmModel realm,
                                                                           String userId,
                                                                           String type)

      Obtains the credentials of type `type` that are associated with the federated user identified by `userId`.
      Parameters:
        `realm` - a reference to the realm.
        `userId` - the user identifier.
        `type` - the credential type.
      Returns:
        a non-null `Stream` of credentials.

    - #### getStoredCredentialByNameAndType

          CredentialModel getStoredCredentialByNameAndType(RealmModel realm,
                                                           String userId,
                                                           String name,
                                                           String type)

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