public interface ClientProvider extends ClientLookupProvider, Provider
Modifier and Type | Method and Description |
---|---|
default ClientModel |
addClient(RealmModel realm,
String clientId)
Adds a client with given
clientId to the given realm. |
ClientModel |
addClient(RealmModel realm,
String id,
String clientId)
Adds a client with given internal ID and
clientId to the given realm. |
void |
addClientScopes(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 removal
|
default List<ClientModel> |
getAlwaysDisplayInConsoleClients(RealmModel realm)
Deprecated.
use the stream variant instead
|
Stream<ClientModel> |
getAlwaysDisplayInConsoleClientsStream(RealmModel realm)
Returns a stream of clients that are expected to always show up in account console.
|
default List<ClientModel> |
getClients(RealmModel realm)
Deprecated.
use the stream variant instead
Effectively the same as the call
getClients(realm, null, null) . |
default List<ClientModel> |
getClients(RealmModel realm,
Integer firstResult,
Integer maxResults)
Deprecated.
use the stream variant instead
|
long |
getClientsCount(RealmModel realm)
Returns number of clients in the given realm
|
default 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.
|
default boolean |
removeClient(String id,
RealmModel realm)
Deprecated.
Use
removeClient(RealmModel, String) instead. |
void |
removeClients(RealmModel realm)
Removes all clients from the given realm.
|
void |
removeClientScope(RealmModel realm,
ClientModel client,
ClientScopeModel clientScope)
Unassign clientScope from the client.
|
getClientByClientId, getClientByClientId, getClientById, getClientById, getClientScopes, searchClientsByAttributes, searchClientsByClientId, searchClientsByClientIdStream
@Deprecated default List<ClientModel> getClients(RealmModel realm, Integer firstResult, Integer maxResults)
realm
- Realm.firstResult
- First result to return. Ignored if negative or null
.maxResults
- Maximum number of results to return. Ignored if negative or null
.null
.Stream<ClientModel> getClientsStream(RealmModel realm, Integer firstResult, Integer maxResults)
realm
- Realm.firstResult
- First result to return. Ignored if negative or null
.maxResults
- Maximum number of results to return. Ignored if negative or null
.null
.@Deprecated default List<ClientModel> getClients(RealmModel realm)
getClients(realm, null, null)
.realm
- Realm.null
.default Stream<ClientModel> getClientsStream(RealmModel realm)
getClientsStream(realm, null, null)
.realm
- Realm.null
.default ClientModel addClient(RealmModel realm, String clientId)
clientId
to the given realm.
The internal ID of the client will be created automatically.realm
- Realm owning this client.clientId
- String that identifies the client to the external parties.
Maps to client_id
in OIDC or entityID
in SAML.ClientModel addClient(RealmModel realm, String id, String clientId)
clientId
to the given realm.realm
- 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.IllegalArgumentException
- If id
does not conform
the format understood by the underlying store.long getClientsCount(RealmModel realm)
realm
- Realm.@Deprecated default List<ClientModel> getAlwaysDisplayInConsoleClients(RealmModel realm)
realm
- Realm owning the clients.null
.Stream<ClientModel> getAlwaysDisplayInConsoleClientsStream(RealmModel realm)
realm
- Realm owning the clients.null
.default boolean removeClient(String id, RealmModel realm)
removeClient(RealmModel, String)
instead.id
- Internal ID of the clientrealm
- Realm.true
if the client existed and has been removed, false
otherwise.boolean removeClient(RealmModel realm, String id)
realm
- Realm.id
- Internal ID of the clienttrue
if the client existed and has been removed, false
otherwise.void removeClients(RealmModel realm)
realm
- Realm.void addClientScopes(RealmModel realm, ClientModel client, Set<ClientScopeModel> clientScopes, boolean defaultScope)
realm
- Realm.client
- Client.clientScopes
- to be assigneddefaultScope
- if true the scopes are assigned as default, or optional in case of falsevoid removeClientScope(RealmModel realm, ClientModel client, ClientScopeModel clientScope)
realm
- Realm.client
- Client.clientScope
- to be unassigned@Deprecated Map<ClientModel,Set<String>> getAllRedirectUrisOfEnabledClients(RealmModel realm)
realm
- Copyright © 2021 JBoss by Red Hat. All rights reserved.