Package org.keycloak.storage.openshift
Class OpenshiftClientStorageProvider
- java.lang.Object
-
- org.keycloak.storage.openshift.OpenshiftClientStorageProvider
-
- All Implemented Interfaces:
Provider
,ClientLookupProvider
,ClientStorageProvider
public class OpenshiftClientStorageProvider extends Object implements ClientStorageProvider
- Author:
- Pedro Igor
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
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.Map<String,ClientScopeModel>
getClientScopes(RealmModel realm, ClientModel client, boolean defaultScopes)
Return all default scopes (ifdefaultScope
istrue
) or all optional scopes (ifdefaultScope
isfalse
) linked with the clientStream<ClientModel>
searchClientsByAttributes(RealmModel realm, Map<String,String> attributes, Integer firstResult, Integer maxResults)
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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.storage.client.ClientStorageProvider
preRemove, preRemove, preRemove
-
-
-
-
Method Detail
-
getClientById
public ClientModel getClientById(RealmModel realm, String id)
Description copied from interface:ClientLookupProvider
Exact search for a client by its internal ID.- Specified by:
getClientById
in interfaceClientLookupProvider
- Parameters:
realm
- Realm to limit the search.id
- Internal ID- Returns:
- Model of the client, or
null
if no client is found.
-
getClientByClientId
public ClientModel getClientByClientId(RealmModel realm, String clientId)
Description copied from interface:ClientLookupProvider
Exact search for a client by its public client identifier.- Specified by:
getClientByClientId
in interfaceClientLookupProvider
- Parameters:
realm
- Realm to limit the search for clients.clientId
- String that identifies the client to the external parties. Maps toclient_id
in OIDC orentityID
in SAML.- Returns:
- Model of the client, or
null
if no client is found.
-
searchClientsByClientIdStream
public Stream<ClientModel> searchClientsByClientIdStream(RealmModel realm, String clientId, Integer firstResult, Integer maxResults)
Description copied from interface:ClientLookupProvider
Case-insensitive search for clients that contain the given string in their public client identifier.- Specified by:
searchClientsByClientIdStream
in interfaceClientLookupProvider
- Parameters:
realm
- Realm to limit the search for clients.clientId
- Searched substring of the public client identifier (client_id
in OIDC orentityID
in 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
public Stream<ClientModel> searchClientsByAttributes(RealmModel realm, Map<String,String> attributes, Integer firstResult, Integer maxResults)
- Specified by:
searchClientsByAttributes
in interfaceClientLookupProvider
-
getClientScopes
public Map<String,ClientScopeModel> getClientScopes(RealmModel realm, ClientModel client, boolean defaultScopes)
Description copied from interface:ClientLookupProvider
Return all default scopes (ifdefaultScope
istrue
) or all optional scopes (ifdefaultScope
isfalse
) linked with the client- Specified by:
getClientScopes
in interfaceClientLookupProvider
- 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).
-
-