org.keycloak.storage.federated

## Interface UserConsentFederatedStorage

- All Known Subinterfaces:
    UserConsentFederatedStorage.Streams, UserFederatedStorageProvider, UserFederatedStorageProvider.Streams
  All Known Implementing Classes:
    JpaUserFederatedStorageProvider

      public interface UserConsentFederatedStorage

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `UserConsentFederatedStorage.Streams` 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.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConsent(RealmModel realm, String userId, UserConsentModel consent)`
    `UserConsentModel` | `getConsentByClient(RealmModel realm, String userId, String clientInternalId)`
    `List<UserConsentModel>` | `getConsents(RealmModel realm, String userId)` Deprecated. Use `getConsentsStream` instead.
    `default Stream<UserConsentModel>` | `getConsentsStream(RealmModel realm, String userId)` Obtains the consents associated with the federated user identified by `userId`.
    `boolean` | `revokeConsentForClient(RealmModel realm, String userId, String clientInternalId)`
    `void` | `updateConsent(RealmModel realm, String userId, UserConsentModel consent)`

- - ### Method Detail

    - #### addConsent

          void addConsent(RealmModel realm,
                          String userId,
                          UserConsentModel consent)

    - #### getConsentByClient

          UserConsentModel getConsentByClient(RealmModel realm,
                                              String userId,
                                              String clientInternalId)

    - #### getConsents

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

      Deprecated. Use `getConsentsStream` instead.

    - #### getConsentsStream

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

      Obtains the consents 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 consents associated with the user.

    - #### updateConsent

          void updateConsent(RealmModel realm,
                             String userId,
                             UserConsentModel consent)

    - #### revokeConsentForClient

          boolean revokeConsentForClient(RealmModel realm,
                                         String userId,
                                         String clientInternalId)

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