public class MapClientProvider extends Object implements ClientProvider
| Constructor and Description |
|---|
MapClientProvider(KeycloakSession session,
MapStorage<UUID,MapClientEntity> clientStore,
ConcurrentMap<UUID,ConcurrentMap<String,Integer>> clientRegisteredNodesStore) |
| Modifier and Type | Method and Description |
|---|---|
ClientModel |
addClient(RealmModel realm,
String id,
String clientId)
Adds a client with given internal ID and
clientId to the given realm. |
void |
close() |
Stream<ClientModel> |
getAlwaysDisplayInConsoleClientsStream(RealmModel realm)
Returns a stream of clients that are expected to always show up in account console.
|
ClientModel |
getClientByClientId(RealmModel realm,
String clientId)
Exact search for a client by its public client identifier.
|
ClientModel |
getClientById(RealmModel realm,
String id)
Exact search for a client by its internal ID.
|
long |
getClientsCount(RealmModel realm)
Returns number of clients in the given realm
|
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.
|
boolean |
removeClient(RealmModel realm,
String id)
Removes given client from the given realm.
|
void |
removeClients(RealmModel realm)
Removes all clients from the given realm.
|
Stream<ClientModel> |
searchClientsByClientIdStream(RealmModel realm,
String clientId,
Integer firstResult,
Integer maxResults)
Case-insensitive search for clients that contain the given string in their public client identifier.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClient, getAlwaysDisplayInConsoleClients, getClients, getClients, removeClientgetClientByClientId, getClientById, searchClientsByClientIdpublic MapClientProvider(KeycloakSession session, MapStorage<UUID,MapClientEntity> clientStore, ConcurrentMap<UUID,ConcurrentMap<String,Integer>> clientRegisteredNodesStore)
public Stream<ClientModel> getClientsStream(RealmModel realm, Integer firstResult, Integer maxResults)
ClientProvidergetClientsStream in interface ClientProviderrealm - Realm.firstResult - First result to return. Ignored if negative or null.maxResults - Maximum number of results to return. Ignored if negative or null.null.public Stream<ClientModel> getClientsStream(RealmModel realm)
ClientProvidergetClientsStream(realm, null, null).getClientsStream in interface ClientProviderrealm - Realm.null.public ClientModel addClient(RealmModel realm, String id, String clientId)
ClientProviderclientId to the given realm.addClient in interface ClientProviderrealm - Realm owning this client.id - Internal ID of the client or null if one is to be created by the underlying storeclientId - String that identifies the client to the external parties.
Maps to client_id in OIDC or entityID in SAML.public Stream<ClientModel> getAlwaysDisplayInConsoleClientsStream(RealmModel realm)
ClientProvidergetAlwaysDisplayInConsoleClientsStream in interface ClientProviderrealm - Realm owning the clients.null.public void removeClients(RealmModel realm)
ClientProviderremoveClients in interface ClientProviderrealm - Realm.public boolean removeClient(RealmModel realm, String id)
ClientProviderremoveClient in interface ClientProviderrealm - Realm.id - Internal ID of the clienttrue if the client existed and has been removed, false otherwise.public long getClientsCount(RealmModel realm)
ClientProvidergetClientsCount in interface ClientProviderrealm - Realm.public ClientModel getClientById(RealmModel realm, String id)
ClientLookupProvidergetClientById in interface ClientLookupProviderrealm - Realm to limit the search.id - Internal IDnull if no client is found.public ClientModel getClientByClientId(RealmModel realm, String clientId)
ClientLookupProvidergetClientByClientId in interface ClientLookupProviderrealm - Realm to limit the search for clients.clientId - String that identifies the client to the external parties.
Maps to client_id in OIDC or entityID in SAML.null if no client is found.public Stream<ClientModel> searchClientsByClientIdStream(RealmModel realm, String clientId, Integer firstResult, Integer maxResults)
ClientLookupProvidersearchClientsByClientIdStream in interface ClientLookupProviderrealm - Realm to limit the search for clients.clientId - Searched substring of the public client
identifier (client_id in OIDC or entityID in SAML.)firstResult - First result to return. Ignored if negative or null.maxResults - Maximum number of results to return. Ignored if negative or null.Copyright © 2021 JBoss by Red Hat. All rights reserved.