org.keycloak.models

## Interface UserProvider.Streams

- All Superinterfaces:
    Provider, UserBulkUpdateProvider, UserLookupProvider, UserProvider, UserQueryProvider, UserQueryProvider.Streams, UserRegistrationProvider
  All Known Subinterfaces:
    UserCache.Streams
  All Known Implementing Classes:
    JpaUserProvider, MapUserProvider, UserCacheSession, UserStorageManager
  Enclosing interface:
    UserProvider

      public static interface UserProvider.Streams
      extends UserProvider, UserQueryProvider.Streams

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.UserProvider

      `UserProvider.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 user identified by the specified `userId`.
    `default Set<FederatedIdentityModel>` | `getFederatedIdentities(UserModel user, RealmModel realm)`
    `Stream<FederatedIdentityModel>` | `getFederatedIdentitiesStream(UserModel user, RealmModel realm)` Obtains the federated identities of the specified user.
    `default List<UserModel>` | `getUsers(RealmModel realm, boolean includeServiceAccounts)`
    `default List<UserModel>` | `getUsers(RealmModel realm, int firstResult, int maxResults, boolean includeServiceAccounts)`
    `Stream<UserModel>` | `getUsersStream(RealmModel realm, boolean includeServiceAccounts)` Obtains the users associated with the specified realm.
    `Stream<UserModel>` | `getUsersStream(RealmModel realm, Integer firstResult, Integer maxResults, boolean includeServiceAccounts)` Obtains the users associated with the specified realm.

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

      `addConsent, addFederatedIdentity, addUser, close, getConsentByClient, getFederatedIdentity, getNotBeforeOfUser, getServiceAccount, getUserByFederatedIdentity, preRemove, preRemove, preRemove, preRemove, preRemove, preRemove, preRemove, preRemove, removeFederatedIdentity, removeImportedUsers, revokeConsentForClient, setNotBeforeForUser, unlinkUsers, updateConsent, updateFederatedIdentity`

    - ### Methods inherited from interface org.keycloak.storage.user.UserLookupProvider

      `getUserByEmail, getUserById, getUserByUsername`

    - ### Methods inherited from interface org.keycloak.storage.user.UserRegistrationProvider

      `addUser, removeUser`

    - ### Methods inherited from interface org.keycloak.storage.user.UserBulkUpdateProvider

      `grantToAllUsers`

    - ### Methods inherited from interface org.keycloak.storage.user.UserQueryProvider.Streams

      `getGroupMembers, getGroupMembers, getGroupMembersStream, getGroupMembersStream, getUsers, getUsers, getUsersStream, getUsersStream, searchForUser, searchForUser, searchForUser, searchForUser, searchForUserByUserAttribute, searchForUserByUserAttributeStream, searchForUserStream, searchForUserStream, searchForUserStream, searchForUserStream`

    - ### Methods inherited from interface org.keycloak.storage.user.UserQueryProvider

      `countUsersInGroups, getRoleMembers, getRoleMembers, getRoleMembersStream, getRoleMembersStream, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCount`

- - ### Method Detail

    - #### getFederatedIdentities

          default Set<FederatedIdentityModel> getFederatedIdentities(UserModel user,
                                                                     RealmModel realm)

      Specified by:
        `getFederatedIdentities` in interface `UserProvider`

    - #### getFederatedIdentitiesStream

          Stream<FederatedIdentityModel> getFederatedIdentitiesStream(UserModel user,
                                                                      RealmModel realm)

      Description copied from interface: `UserProvider`
      Obtains the federated identities of the specified user.
      Specified by:
        `getFederatedIdentitiesStream` in interface `UserProvider`
      Parameters:
        `user` - a reference to the user.
        `realm` - a reference to the realm.
      Returns:
        a non-null `Stream` of federated identities associated with the user.

    - #### getConsents

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

      Specified by:
        `getConsents` in interface `UserProvider`

    - #### getConsentsStream

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

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

    - #### getUsers

          default List<UserModel> getUsers(RealmModel realm,
                                           boolean includeServiceAccounts)

      Specified by:
        `getUsers` in interface `UserProvider`

    - #### getUsersStream

          Stream<UserModel> getUsersStream(RealmModel realm,
                                           boolean includeServiceAccounts)

      Description copied from interface: `UserProvider`
      Obtains the users associated with the specified realm.
      Specified by:
        `getUsersStream` in interface `UserProvider`
      Parameters:
        `realm` - a reference to the realm being used for the search.
        `includeServiceAccounts` - `true` if service accounts should be included in the result; `false` otherwise.
      Returns:
        a non-null `Stream` of users associated withe the realm.

    - #### getUsers

          default List<UserModel> getUsers(RealmModel realm,
                                           int firstResult,
                                           int maxResults,
                                           boolean includeServiceAccounts)

      Specified by:
        `getUsers` in interface `UserProvider`

    - #### getUsersStream

          Stream<UserModel> getUsersStream(RealmModel realm,
                                           Integer firstResult,
                                           Integer maxResults,
                                           boolean includeServiceAccounts)

      Description copied from interface: `UserProvider`
      Obtains the users associated with the specified realm.
      Specified by:
        `getUsersStream` in interface `UserProvider`
      Parameters:
        `realm` - a reference to the realm being used for the search.
        `firstResult` - first result to return. Ignored if negative.
        `maxResults` - maximum number of results to return. Ignored if negative.
        `includeServiceAccounts` - `true` if service accounts should be included in the result; `false` otherwise.
      Returns:
        a non-null `Stream` of users associated withe the realm.

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