Package org.keycloak.storage.client
Interface ClientLookupProvider
- All Known Subinterfaces:
CacheRealmProvider,ClientProvider,ClientStorageProvider
- All Known Implementing Classes:
ClientStorageManager,JpaRealmProvider,RealmCacheSession
public interface ClientLookupProvider
Abstraction interface for lookoup of clients by id and clientId. These methods required for participating in login flows.
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Method Summary
Modifier and TypeMethodDescriptiongetClientByClientId(RealmModel realm, String clientId) Exact search for a client by its public client identifier.getClientById(RealmModel realm, String id) Exact search for a client by its internal ID.getClientScopes(RealmModel realm, ClientModel client, boolean defaultScopes) Return all default scopes (ifdefaultScopeistrue) or all optional scopes (ifdefaultScopeisfalse) linked with the clientsearchClientsByAttributes(RealmModel realm, Map<String, String> attributes, Integer firstResult, Integer maxResults) default Stream<ClientModel>searchClientsByAuthenticationFlowBindingOverrides(RealmModel realm, Map<String, String> overrides, Integer firstResult, Integer maxResults) searchClientsByClientIdStream(RealmModel realm, String clientId, Integer firstResult, Integer maxResults) Case-insensitive search for clients that contain the given string in their public client identifier.
-
Method Details
-
getClientById
Exact search for a client by its internal ID.- Parameters:
realm- Realm to limit the search.id- Internal ID- Returns:
- Model of the client, or
nullif no client is found.
-
getClientByClientId
Exact search for a client by its public client identifier.- Parameters:
realm- Realm to limit the search for clients.clientId- String that identifies the client to the external parties. Maps toclient_idin OIDC orentityIDin SAML.- Returns:
- Model of the client, or
nullif no client is found.
-
searchClientsByClientIdStream
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.- Parameters:
realm- Realm to limit the search for clients.clientId- Searched substring of the public client identifier (client_idin OIDC orentityIDin SAML.)firstResult- First result to return. Ignored if negative ornull.maxResults- Maximum number of results to return. Ignored if negative ornull.- Returns:
- Stream of ClientModel or an empty stream if no client is found. Never returns
null.
-
searchClientsByAttributes
Stream<ClientModel> searchClientsByAttributes(RealmModel realm, Map<String, String> attributes, Integer firstResult, Integer maxResults) -
searchClientsByAuthenticationFlowBindingOverrides
default Stream<ClientModel> searchClientsByAuthenticationFlowBindingOverrides(RealmModel realm, Map<String, String> overrides, Integer firstResult, Integer maxResults) -
getClientScopes
Map<String,ClientScopeModel> getClientScopes(RealmModel realm, ClientModel client, boolean defaultScopes) Return all default scopes (ifdefaultScopeistrue) or all optional scopes (ifdefaultScopeisfalse) linked with the client- Parameters:
realm- Realmclient- ClientdefaultScopes- if true default scopes, if false optional scopes, are returned- Returns:
- map where key is the name of the clientScope, value is particular clientScope. Returns empty map if no scopes linked (never returns null).
-