org.keycloak.storage.federated

## Interface UserFederatedUserCredentialStore.Streams

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

      public static interface UserFederatedUserCredentialStore.Streams
      extends UserFederatedUserCredentialStore

  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.

  It allows for implementations to focus on the `Stream`-based approach for processing sets of data and benefit from the potential memory and performance optimizations of that approach.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.storage.federated.UserFederatedUserCredentialStore

      `UserFederatedUserCredentialStore.Streams`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default List<CredentialModel>` | `getStoredCredentials(RealmModel realm, String userId)`
    `default List<CredentialModel>` | `getStoredCredentialsByType(RealmModel realm, String userId, String type)`
    `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`.
    `Stream<CredentialModel>` | `getStoredCredentialsStream(RealmModel realm, String userId)` Obtains the credentials associated with the federated user identified by `userId`.

    - ### Methods inherited from interface org.keycloak.storage.federated.UserFederatedUserCredentialStore

      `createCredential, getStoredCredentialById, getStoredCredentialByNameAndType, removeStoredCredential, updateCredential`

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

      `close`

- - ### Method Detail

    - #### getStoredCredentials

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

      Specified by:
        `getStoredCredentials` in interface `UserFederatedUserCredentialStore`

    - #### getStoredCredentialsStream

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

      Description copied from interface: `UserFederatedUserCredentialStore`
      Obtains the credentials associated with the federated user identified by `userId`.
      Specified by:
        `getStoredCredentialsStream` in interface `UserFederatedUserCredentialStore`
      Parameters:
        `realm` - a reference to the realm.
        `userId` - the user identifier.
      Returns:
        a non-null `Stream` of credentials.

    - #### getStoredCredentialsByType

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

      Specified by:
        `getStoredCredentialsByType` in interface `UserFederatedUserCredentialStore`

    - #### getStoredCredentialsByTypeStream

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

      Description copied from interface: `UserFederatedUserCredentialStore`
      Obtains the credentials of type `type` that are associated with the federated user identified by `userId`.
      Specified by:
        `getStoredCredentialsByTypeStream` in interface `UserFederatedUserCredentialStore`
      Parameters:
        `realm` - a reference to the realm.
        `userId` - the user identifier.
        `type` - the credential type.
      Returns:
        a non-null `Stream` of credentials.

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