org.keycloak.storage.federated

## Interface UserConsentFederatedStorage.Streams

- All Superinterfaces:
    UserConsentFederatedStorage
  All Known Subinterfaces:
    UserFederatedStorageProvider.Streams
  All Known Implementing Classes:
    JpaUserFederatedStorageProvider
  Enclosing interface:
    UserConsentFederatedStorage

      public static interface UserConsentFederatedStorage.Streams
      extends UserConsentFederatedStorage

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

      `UserConsentFederatedStorage.Streams`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default List<UserConsentModel>` | `getConsents(RealmModel realm, String userId)`
    `Stream<UserConsentModel>` | `getConsentsStream(RealmModel realm, String userId)` Obtains the consents associated with the federated user identified by `userId`.

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

      `addConsent, getConsentByClient, revokeConsentForClient, updateConsent`

- - ### Method Detail

    - #### getConsents

          default List<UserConsentModel> getConsents(RealmModel realm,
                                                     String userId)

      Specified by:
        `getConsents` in interface `UserConsentFederatedStorage`

    - #### getConsentsStream

          Stream<UserConsentModel> getConsentsStream(RealmModel realm,
                                                     String userId)

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

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