org.keycloak.models

## Interface UserCredentialManager.Streams

- All Superinterfaces:
    Provider, UserCredentialManager, UserCredentialStore, UserCredentialStore.Streams
  All Known Implementing Classes:
    UserCredentialStoreManager
  Enclosing interface:
    UserCredentialManager

      public static interface UserCredentialManager.Streams
      extends UserCredentialManager, UserCredentialStore.Streams

  The `UserCredentialManager.Streams` interface makes all collection-based methods in `UserCredentialManager` 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.models.UserCredentialManager

      `UserCredentialManager.Streams`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default List<String>` | `getConfiguredUserStorageCredentialTypes(RealmModel realm, UserModel user)` Return credential types, which are provided by the user storage where user is stored.
    `Stream<String>` | `getConfiguredUserStorageCredentialTypesStream(RealmModel realm, UserModel user)` Obtains the credential types provided by the user storage where the specified user is stored.
    `default Set<String>` | `getDisableableCredentialTypes(RealmModel realm, UserModel user)` Returns a set of credential types that can be disabled by disableCredentialType() method
    `Stream<String>` | `getDisableableCredentialTypesStream(RealmModel realm, UserModel user)` Obtains the credential types that can be disabled by means of the `UserCredentialManager.disableCredentialType(RealmModel, UserModel, String)` method.

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

      `authenticate, createCredentialThroughProvider, disableCredentialType, isConfiguredFor, isConfiguredLocally, isValid, isValid, updateCredential, updateCredentialLabel`

    - ### Methods inherited from interface org.keycloak.credential.UserCredentialStore.Streams

      `getStoredCredentials, getStoredCredentialsByType, getStoredCredentialsByTypeStream, getStoredCredentialsStream`

    - ### Methods inherited from interface org.keycloak.credential.UserCredentialStore

      `createCredential, getStoredCredentialById, getStoredCredentialByNameAndType, moveCredentialTo, removeStoredCredential, updateCredential`

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

      `close`

- - ### Method Detail

    - #### getDisableableCredentialTypes

          default Set<String> getDisableableCredentialTypes(RealmModel realm,
                                                            UserModel user)

      Description copied from interface: `UserCredentialManager`
      Returns a set of credential types that can be disabled by disableCredentialType() method
      Specified by:
        `getDisableableCredentialTypes` in interface `UserCredentialManager`
      Returns:

    - #### getDisableableCredentialTypesStream

          Stream<String> getDisableableCredentialTypesStream(RealmModel realm,
                                                             UserModel user)

      Description copied from interface: `UserCredentialManager`
      Obtains the credential types that can be disabled by means of the `UserCredentialManager.disableCredentialType(RealmModel, UserModel, String)` method.
      Specified by:
        `getDisableableCredentialTypesStream` in interface `UserCredentialManager`
      Parameters:
        `realm` - a reference to the realm.
        `user` - the user whose credentials are being searched.
      Returns:
        a non-null `Stream` of credential types.

    - #### getConfiguredUserStorageCredentialTypes

          default List<String> getConfiguredUserStorageCredentialTypes(RealmModel realm,
                                                                       UserModel user)

      Description copied from interface: `UserCredentialManager`
      Return credential types, which are provided by the user storage where user is stored. Returned values can contain for example "password", "otp" etc. This will always return empty list for "local" users, which are not backed by any user storage
      Specified by:
        `getConfiguredUserStorageCredentialTypes` in interface `UserCredentialManager`
      Returns:

    - #### getConfiguredUserStorageCredentialTypesStream

          Stream<String> getConfiguredUserStorageCredentialTypesStream(RealmModel realm,
                                                                       UserModel user)

      Description copied from interface: `UserCredentialManager`
      Obtains the credential types provided by the user storage where the specified user is stored. Examples of returned values are "password", "otp", etc.

      This method will always return an empty stream for "local" users - i.e. users that are not backed by any user storage.
      Specified by:
        `getConfiguredUserStorageCredentialTypesStream` in interface `UserCredentialManager`
      Parameters:
        `realm` - a reference to the realm.
        `user` - a reference to the user.
      Returns:
        a non-null `Stream` of credential types.

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