Package org.keycloak.storage.user
Interface UserLookupProvider
- 
- All Known Subinterfaces:
- UserCache,- UserCache.Streams,- UserLookupProvider.Streams,- UserProvider,- UserProvider.Streams
 - All Known Implementing Classes:
- JpaUserProvider,- KerberosFederationProvider,- LDAPStorageProvider,- MapUserProvider,- SSSDFederationProvider,- UserCacheSession,- UserStorageManager
 
 public interface UserLookupProviderThis is an optional capability interface that is intended to be implemented by anyUserStorageProviderthat supports basic user querying. You must implement this interface if you want to be able to log in to keycloak using users from your storage. Note that all methods in this interface should limit search only to data available within the storage that is represented by this provider. They should not lookup other storage providers for additional information. Optional capability interface implemented by UserStorageProviders.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceUserLookupProvider.StreamsDeprecated.This interface is no longer necessary, collection-based methods were removed from the parent interface and therefore the parent interface can be used directly
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CredentialValidationOutputgetUserByCredential(RealmModel realm, CredentialInput input)UserModelgetUserByEmail(RealmModel realm, String email)Returns a user with the given email belonging to the realmUserModelgetUserById(RealmModel realm, String id)Returns a user with the given id belonging to the realmUserModelgetUserByUsername(RealmModel realm, String username)Exact search for a user by its username.
 
- 
- 
- 
Method Detail- 
getUserByIdUserModel getUserById(RealmModel realm, String id) Returns a user with the given id belonging to the realm- Parameters:
- id- id of the user
- realm- the realm model
- Returns:
- found user model, or nullif no such user exists
 
 - 
getUserByUsernameUserModel getUserByUsername(RealmModel realm, String username) Exact search for a user by its username. Returns a user with the given username belonging to the realm- Parameters:
- username- (case-sensitivity is controlled by storage)
- realm- the realm model
- Returns:
- found user model, or nullif no such user exists
- Throws:
- ModelDuplicateException- when searched with case insensitive mode and there are more users with username which differs only by case
 
 - 
getUserByCredentialdefault CredentialValidationOutput getUserByCredential(RealmModel realm, CredentialInput input) 
 - 
getUserByEmailUserModel getUserByEmail(RealmModel realm, String email) Returns a user with the given email belonging to the realm- Parameters:
- email- email address
- realm- the realm model
- Returns:
- found user model, or nullif no such user exists
- Throws:
- ModelDuplicateException- when there are more users with same email
 
 
- 
 
-