org.keycloak.models

## Interface UserProvider

- All Superinterfaces:
    Provider
  All Known Subinterfaces:
    CacheUserProvider
  All Known Implementing Classes:
    DefaultCacheUserProvider, JpaUserProvider, MongoUserProvider, NoCacheUserProvider, UserFederationManager

      public interface UserProvider
      extends Provider

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSocialLink(RealmModel realm, UserModel user, SocialLinkModel socialLink)`
    `UserModel` | `addUser(RealmModel realm, String username)`
    `UserModel` | `addUser(RealmModel realm, String id, String username, boolean addDefaultRoles)`
    `void` | `close()`
    `SocialLinkModel` | `getSocialLink(UserModel user, String socialProvider, RealmModel realm)`
    `Set<SocialLinkModel>` | `getSocialLinks(UserModel user, RealmModel realm)`
    `UserModel` | `getUserByEmail(String email, RealmModel realm)`
    `UserModel` | `getUserById(String id, RealmModel realm)`
    `UserModel` | `getUserBySocialLink(SocialLinkModel socialLink, RealmModel realm)`
    `UserModel` | `getUserByUsername(String username, RealmModel realm)`
    `List<UserModel>` | `getUsers(RealmModel realm)`
    `List<UserModel>` | `getUsers(RealmModel realm, int firstResult, int maxResults)`
    `int` | `getUsersCount(RealmModel realm)`
    `void` | `preRemove(RealmModel realm)`
    `void` | `preRemove(RealmModel realm, RoleModel role)`
    `void` | `preRemove(RealmModel realm, UserFederationProviderModel link)`
    `boolean` | `removeSocialLink(RealmModel realm, UserModel user, String socialProvider)`
    `boolean` | `removeUser(RealmModel realm, UserModel user)`
    `List<UserModel>` | `searchForUser(String search, RealmModel realm)`
    `List<UserModel>` | `searchForUser(String search, RealmModel realm, int firstResult, int maxResults)`
    `List<UserModel>` | `searchForUserByAttributes(Map<String,String> attributes, RealmModel realm)`
    `List<UserModel>` | `searchForUserByAttributes(Map<String,String> attributes, RealmModel realm, int firstResult, int maxResults)`
    `boolean` | `validCredentials(RealmModel realm, UserModel user, List<UserCredentialModel> input)`
    `boolean` | `validCredentials(RealmModel realm, UserModel user, UserCredentialModel... input)`

- - ### Method Detail

    - #### addUser

          UserModel addUser(RealmModel realm,
                          String id,
                          String username,
                          boolean addDefaultRoles)

    - #### addUser

          UserModel addUser(RealmModel realm,
                          String username)

    - #### removeUser

          boolean removeUser(RealmModel realm,
                           UserModel user)

    - #### addSocialLink

          void addSocialLink(RealmModel realm,
                           UserModel user,
                           SocialLinkModel socialLink)

    - #### removeSocialLink

          boolean removeSocialLink(RealmModel realm,
                                 UserModel user,
                                 String socialProvider)

    - #### getUserById

          UserModel getUserById(String id,
                              RealmModel realm)

    - #### getUserByUsername

          UserModel getUserByUsername(String username,
                                    RealmModel realm)

    - #### getUserByEmail

          UserModel getUserByEmail(String email,
                                 RealmModel realm)

    - #### getUserBySocialLink

          UserModel getUserBySocialLink(SocialLinkModel socialLink,
                                      RealmModel realm)

    - #### getUsers

          List<UserModel> getUsers(RealmModel realm)

    - #### getUsersCount

          int getUsersCount(RealmModel realm)

    - #### getUsers

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

    - #### searchForUser

          List<UserModel> searchForUser(String search,
                                      RealmModel realm)

    - #### searchForUser

          List<UserModel> searchForUser(String search,
                                      RealmModel realm,
                                      int firstResult,
                                      int maxResults)

    - #### searchForUserByAttributes

          List<UserModel> searchForUserByAttributes(Map<String,String> attributes,
                                                  RealmModel realm)

    - #### searchForUserByAttributes

          List<UserModel> searchForUserByAttributes(Map<String,String> attributes,
                                                  RealmModel realm,
                                                  int firstResult,
                                                  int maxResults)

    - #### getSocialLinks

          Set<SocialLinkModel> getSocialLinks(UserModel user,
                                            RealmModel realm)

    - #### getSocialLink

          SocialLinkModel getSocialLink(UserModel user,
                                      String socialProvider,
                                      RealmModel realm)

    - #### preRemove

          void preRemove(RealmModel realm)

    - #### preRemove

          void preRemove(RealmModel realm,
                       UserFederationProviderModel link)

    - #### preRemove

          void preRemove(RealmModel realm,
                       RoleModel role)

    - #### validCredentials

          boolean validCredentials(RealmModel realm,
                                 UserModel user,
                                 List<UserCredentialModel> input)

    - #### validCredentials

          boolean validCredentials(RealmModel realm,
                                 UserModel user,
                                 UserCredentialModel... input)

    - #### close

          void close()

      Specified by:
        `close` in interface `Provider`

Copyright © 2014. All Rights Reserved.