org.keycloak.storage.federated

## Interface UserAttributeFederatedStorage

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

      public interface UserAttributeFederatedStorage

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `UserAttributeFederatedStorage.Streams` The `UserAttributeFederatedStorage.Streams` interface makes all collection-based methods in `UserAttributeFederatedStorage` 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
    --- | ---
    `MultivaluedHashMap<String,String>` | `getAttributes(RealmModel realm, String userId)`
    `List<String>` | `getUsersByUserAttribute(RealmModel realm, String name, String value)` Deprecated. Use `getUsersByUserAttributeStream` instead.
    `default Stream<String>` | `getUsersByUserAttributeStream(RealmModel realm, String name, String value)` Searches for federated users that have an attribute with the specified `name` and `value`.
    `void` | `removeAttribute(RealmModel realm, String userId, String name)`
    `void` | `setAttribute(RealmModel realm, String userId, String name, List<String> values)`
    `void` | `setSingleAttribute(RealmModel realm, String userId, String name, String value)`

- - ### Method Detail

    - #### setSingleAttribute

          void setSingleAttribute(RealmModel realm,
                                  String userId,
                                  String name,
                                  String value)

    - #### setAttribute

          void setAttribute(RealmModel realm,
                            String userId,
                            String name,
                            List<String> values)

    - #### removeAttribute

          void removeAttribute(RealmModel realm,
                               String userId,
                               String name)

    - #### getAttributes

          MultivaluedHashMap<String,String> getAttributes(RealmModel realm,
                                                          String userId)

    - #### getUsersByUserAttribute

          @Deprecated
          List<String> getUsersByUserAttribute(RealmModel realm,
                                                           String name,
                                                           String value)

      Deprecated. Use `getUsersByUserAttributeStream` instead.

    - #### getUsersByUserAttributeStream

          default Stream<String> getUsersByUserAttributeStream(RealmModel realm,
                                                               String name,
                                                               String value)

      Searches for federated users that have an attribute with the specified `name` and `value`.
      Parameters:
        `realm` - a reference to the realm.
        `name` - the attribute name.
        `value` - the attribute value.
      Returns:
        a non-null `Stream` of users that match the search criteria.

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