Package org.keycloak.credential
Interface UserCredentialStore.Streams
-
- All Superinterfaces:
Provider
,UserCredentialStore
- All Known Subinterfaces:
UserCredentialManager.Streams
- Enclosing interface:
- UserCredentialStore
public static interface UserCredentialStore.Streams extends UserCredentialStore
TheUserCredentialStore.Streams
interface makes all collection-based methods inUserCredentialStore
default by providing implementations that delegate to theStream
-based variants instead of the other way around. It allows for implementations to focus on theStream
-based approach for processing sets of data and benefit from the potential memory and performance optimizations of that approach.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.credential.UserCredentialStore
UserCredentialStore.Streams
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default List<CredentialModel>
getStoredCredentials(RealmModel realm, UserModel user)
default List<CredentialModel>
getStoredCredentialsByType(RealmModel realm, UserModel user, String type)
Stream<CredentialModel>
getStoredCredentialsByTypeStream(RealmModel realm, UserModel user, String type)
Obtains the stored credentials associated with the specified user that match the specified type.Stream<CredentialModel>
getStoredCredentialsStream(RealmModel realm, UserModel user)
Obtains the stored credentials associated with the specified user.-
Methods inherited from interface org.keycloak.credential.UserCredentialStore
createCredential, getStoredCredentialById, getStoredCredentialByNameAndType, moveCredentialTo, removeStoredCredential, updateCredential
-
-
-
-
Method Detail
-
getStoredCredentials
default List<CredentialModel> getStoredCredentials(RealmModel realm, UserModel user)
- Specified by:
getStoredCredentials
in interfaceUserCredentialStore
-
getStoredCredentialsStream
Stream<CredentialModel> getStoredCredentialsStream(RealmModel realm, UserModel user)
Description copied from interface:UserCredentialStore
Obtains the stored credentials associated with the specified user.- Specified by:
getStoredCredentialsStream
in interfaceUserCredentialStore
- Parameters:
realm
- a reference to the realm.user
- the user whose credentials are being searched.- Returns:
- a non-null
Stream
of credentials.
-
getStoredCredentialsByType
default List<CredentialModel> getStoredCredentialsByType(RealmModel realm, UserModel user, String type)
- Specified by:
getStoredCredentialsByType
in interfaceUserCredentialStore
-
getStoredCredentialsByTypeStream
Stream<CredentialModel> getStoredCredentialsByTypeStream(RealmModel realm, UserModel user, String type)
Description copied from interface:UserCredentialStore
Obtains the stored credentials associated with the specified user that match the specified type.- Specified by:
getStoredCredentialsByTypeStream
in interfaceUserCredentialStore
- Parameters:
realm
- a reference to the realm.user
- the user whose credentials are being searched.type
- the type of credentials being searched.- Returns:
- a non-null
Stream
of credentials.
-
-