Package org.keycloak.models
Interface ClientProvider
- 
- All Superinterfaces:
- ClientLookupProvider,- Provider
 - All Known Subinterfaces:
- CacheRealmProvider,- RealmProvider
 - All Known Implementing Classes:
- ClientStorageManager,- JpaRealmProvider,- MapClientProvider,- MapRealmProvider,- RealmCacheSession
 
 public interface ClientProvider extends ClientLookupProvider, Provider Provider of the client records.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default ClientModeladdClient(RealmModel realm, String clientId)Adds a client with givenclientIdto the given realm.ClientModeladdClient(RealmModel realm, String id, String clientId)Adds a client with given internal ID andclientIdto the given realm.voidaddClientScopes(RealmModel realm, ClientModel client, Set<ClientScopeModel> clientScopes, boolean defaultScope)Assign clientScopes to the client.Map<ClientModel,Set<String>>getAllRedirectUrisOfEnabledClients(RealmModel realm)Deprecated.Do not use, this is only to support a deprecated logout endpoint and will vanish with it's removalStream<ClientModel>getAlwaysDisplayInConsoleClientsStream(RealmModel realm)Returns a stream of clients that are expected to always show up in account console.longgetClientsCount(RealmModel realm)Returns number of clients in the given realmdefault Stream<ClientModel>getClientsStream(RealmModel realm)Returns all the clients of the given realm as a stream.Stream<ClientModel>getClientsStream(RealmModel realm, Integer firstResult, Integer maxResults)Returns the clients of the given realm as a stream.booleanremoveClient(RealmModel realm, String id)Removes given client from the given realm.voidremoveClients(RealmModel realm)Removes all clients from the given realm.voidremoveClientScope(RealmModel realm, ClientModel client, ClientScopeModel clientScope)Unassign clientScope from the client.- 
Methods inherited from interface org.keycloak.storage.client.ClientLookupProvidergetClientByClientId, getClientById, getClientScopes, searchClientsByAttributes, searchClientsByClientIdStream
 
- 
 
- 
- 
- 
Method Detail- 
getClientsStreamStream<ClientModel> getClientsStream(RealmModel realm, Integer firstResult, Integer maxResults) Returns the clients of the given realm as a stream.- Parameters:
- realm- Realm.
- firstResult- First result to return. Ignored if negative or- null.
- maxResults- Maximum number of results to return. Ignored if negative or- null.
- Returns:
- Stream of the clients. Never returns null.
 
 - 
getClientsStreamdefault Stream<ClientModel> getClientsStream(RealmModel realm) Returns all the clients of the given realm as a stream. Effectively the same as the callgetClientsStream(realm, null, null).- Parameters:
- realm- Realm.
- Returns:
- Stream of the clients. Never returns null.
 
 - 
addClientdefault ClientModel addClient(RealmModel realm, String clientId) Adds a client with givenclientIdto the given realm. The internal ID of the client will be created automatically.- Parameters:
- realm- Realm owning this client.
- clientId- String that identifies the client to the external parties. Maps to- client_idin OIDC or- entityIDin SAML.
- Returns:
- Model of the created client.
 
 - 
addClientClientModel addClient(RealmModel realm, String id, String clientId) Adds a client with given internal ID andclientIdto the given realm.- Parameters:
- realm- Realm owning this client.
- id- Internal ID of the client or- nullif one is to be created by the underlying store
- clientId- String that identifies the client to the external parties. Maps to- client_idin OIDC or- entityIDin SAML.
- Returns:
- Model of the created client.
- Throws:
- IllegalArgumentException- If- iddoes not conform the format understood by the underlying store.
 
 - 
getClientsCountlong getClientsCount(RealmModel realm) Returns number of clients in the given realm- Parameters:
- realm- Realm.
- Returns:
- Number of the clients in the given realm.
 
 - 
getAlwaysDisplayInConsoleClientsStreamStream<ClientModel> getAlwaysDisplayInConsoleClientsStream(RealmModel realm) Returns a stream of clients that are expected to always show up in account console.- Parameters:
- realm- Realm owning the clients.
- Returns:
- Stream of the clients. Never returns null.
 
 - 
removeClientboolean removeClient(RealmModel realm, String id) Removes given client from the given realm.- Parameters:
- realm- Realm.
- id- Internal ID of the client
- Returns:
- trueif the client existed and has been removed,- falseotherwise.
 
 - 
removeClientsvoid removeClients(RealmModel realm) Removes all clients from the given realm.- Parameters:
- realm- Realm.
 
 - 
addClientScopesvoid addClientScopes(RealmModel realm, ClientModel client, Set<ClientScopeModel> clientScopes, boolean defaultScope) Assign clientScopes to the client. Add as default scopes (if parameter 'defaultScope' is true) or optional scopes (if parameter 'defaultScope' is false)- Parameters:
- realm- Realm.
- client- Client.
- clientScopes- to be assigned
- defaultScope- if true the scopes are assigned as default, or optional in case of false
 
 - 
removeClientScopevoid removeClientScope(RealmModel realm, ClientModel client, ClientScopeModel clientScope) Unassign clientScope from the client.- Parameters:
- realm- Realm.
- client- Client.
- clientScope- to be unassigned
 
 - 
getAllRedirectUrisOfEnabledClients@Deprecated Map<ClientModel,Set<String>> getAllRedirectUrisOfEnabledClients(RealmModel realm) Deprecated.Do not use, this is only to support a deprecated logout endpoint and will vanish with it's removalReturns a map of (rootUrl, {validRedirectUris}) for all enabled clients.- Parameters:
- realm-
- Returns:
 
 
- 
 
-