Package org.keycloak.models
Interface ClientModel
- 
- All Superinterfaces:
- ClientScopeModel,- OrderedModel,- ProtocolMapperContainerModel,- RoleContainerModel,- ScopeContainerModel
 - All Known Implementing Classes:
- AbstractClientModel,- AbstractClientStorageAdapter,- AbstractReadOnlyClientStorageAdapter,- ClientAdapter,- ClientAdapter,- ClientModelLazyDelegate,- ClientModelLazyDelegate.WithId,- MapClientAdapter,- OIDCClientSecretConfigWrapper.ReadOnlyRotatedSecretClientModel,- OpenshiftSAClientAdapter,- UnsupportedOperationsClientStorageAdapter
 
 public interface ClientModel extends ClientScopeModel, RoleContainerModel, ProtocolMapperContainerModel, ScopeContainerModel - Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceClientModel.ClientCreationEventstatic interfaceClientModel.ClientIdChangeEventstatic interfaceClientModel.ClientProtocolUpdatedEventstatic interfaceClientModel.ClientRemovedEventstatic interfaceClientModel.ClientUpdatedEventstatic classClientModel.SearchableFields- 
Nested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModelClientScopeModel.ClientScopeRemovedEvent
 - 
Nested classes/interfaces inherited from interface org.keycloak.models.OrderedModelOrderedModel.OrderedModelComparator<OM extends OrderedModel>
 - 
Nested classes/interfaces inherited from interface org.keycloak.models.RoleContainerModelRoleContainerModel.RoleRemovedEvent
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringLOGO_URIstatic StringPOLICY_URIstatic StringPRIVATE_KEYstatic StringPUBLIC_KEYstatic StringTOS_URIstatic StringX509CERTIFICATE- 
Fields inherited from interface org.keycloak.models.ClientScopeModelCONSENT_SCREEN_TEXT, DISPLAY_ON_CONSENT_SCREEN, DYNAMIC_SCOPE_REGEXP, GUI_ORDER, INCLUDE_IN_TOKEN_SCOPE, IS_DYNAMIC_SCOPE
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddClientScope(ClientScopeModel clientScope, boolean defaultScope)Add clientScope with this client.voidaddClientScopes(Set<ClientScopeModel> clientScopes, boolean defaultScope)Add clientScopes with this client.voidaddRedirectUri(String redirectUri)voidaddWebOrigin(String webOrigin)StringgetAttribute(String name)Map<String,String>getAttributes()StringgetAuthenticationFlowBindingOverride(String binding)Get authentication flow binding override for this client.Map<String,String>getAuthenticationFlowBindingOverrides()StringgetBaseUrl()StringgetClientAuthenticatorType()StringgetClientId()Returns client ID as defined by the user.Map<String,ClientScopeModel>getClientScopes(boolean defaultScope)Return all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this clientdefault StringgetConsentScreenText()StringgetDescription()default ClientScopeModelgetDynamicClientScope(String scope)Returns aClientScopeModelassociated with this client.StringgetId()Returns client internal ID (UUID).StringgetManagementUrl()StringgetName()intgetNodeReRegistrationTimeout()intgetNotBefore()Time in seconds since epocStringgetProtocol()RealmModelgetRealm()Set<String>getRedirectUris()Map<String,Integer>getRegisteredNodes()StringgetRegistrationToken()StringgetRootUrl()StringgetSecret()Set<String>getWebOrigins()default booleanhasDirectScope(RoleModel role)Returnstrue, if this object has the given role directly in its scope.booleanisAlwaysDisplayInConsole()booleanisBearerOnly()booleanisConsentRequired()booleanisDirectAccessGrantsEnabled()default booleanisDisplayOnConsentScreen()booleanisEnabled()booleanisFrontchannelLogout()booleanisFullScopeAllowed()booleanisImplicitFlowEnabled()booleanisPublicClient()booleanisServiceAccountsEnabled()booleanisStandardFlowEnabled()booleanisSurrogateAuthRequired()voidregisterNode(String nodeHost, int registrationTime)Register node or just update the 'lastReRegistration' time if this node is already registeredvoidremoveAttribute(String name)voidremoveAuthenticationFlowBindingOverride(String binding)voidremoveClientScope(ClientScopeModel clientScope)voidremoveRedirectUri(String redirectUri)voidremoveWebOrigin(String webOrigin)voidsetAlwaysDisplayInConsole(boolean alwaysDisplayInConsole)voidsetAttribute(String name, String value)voidsetAuthenticationFlowBindingOverride(String binding, String flowId)voidsetBaseUrl(String url)voidsetBearerOnly(boolean only)voidsetClientAuthenticatorType(String clientAuthenticatorType)voidsetClientId(String clientId)voidsetConsentRequired(boolean consentRequired)voidsetDescription(String description)voidsetDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled)voidsetEnabled(boolean enabled)voidsetFrontchannelLogout(boolean flag)voidsetFullScopeAllowed(boolean value)voidsetImplicitFlowEnabled(boolean implicitFlowEnabled)voidsetManagementUrl(String url)voidsetName(String name)voidsetNodeReRegistrationTimeout(int timeout)voidsetNotBefore(int notBefore)voidsetProtocol(String protocol)voidsetPublicClient(boolean flag)voidsetRedirectUris(Set<String> redirectUris)voidsetRegistrationToken(String registrationToken)voidsetRootUrl(String url)voidsetSecret(String secret)voidsetServiceAccountsEnabled(boolean serviceAccountsEnabled)voidsetStandardFlowEnabled(boolean standardFlowEnabled)voidsetSurrogateAuthRequired(boolean surrogateAuthRequired)voidsetWebOrigins(Set<String> webOrigins)voidunregisterNode(String nodeHost)voidupdateClient()Deprecated.Do not use, to be removedbooleanvalidateSecret(String secret)- 
Methods inherited from interface org.keycloak.models.ClientScopeModelgetDynamicScopeRegexp, getGuiOrder, isDynamicScope, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope, setIsDynamicScope
 - 
Methods inherited from interface org.keycloak.models.ProtocolMapperContainerModeladdProtocolMapper, getProtocolMapperById, getProtocolMapperByName, getProtocolMappersStream, removeProtocolMapper, updateProtocolMapper
 - 
Methods inherited from interface org.keycloak.models.RoleContainerModeladdDefaultRole, addRole, addRole, getDefaultRoles, getDefaultRolesStream, getRole, getRolesStream, getRolesStream, removeDefaultRoles, removeRole, searchForRolesStream, updateDefaultRoles
 - 
Methods inherited from interface org.keycloak.models.ScopeContainerModeladdScopeMapping, deleteScopeMapping, getRealmScopeMappingsStream, getScopeMappingsStream, hasScope
 
- 
 
- 
- 
- 
Field Detail- 
PRIVATE_KEYstatic final String PRIVATE_KEY - See Also:
- Constant Field Values
 
 - 
PUBLIC_KEYstatic final String PUBLIC_KEY - See Also:
- Constant Field Values
 
 - 
X509CERTIFICATEstatic final String X509CERTIFICATE - See Also:
- Constant Field Values
 
 - 
LOGO_URIstatic final String LOGO_URI - See Also:
- Constant Field Values
 
 - 
POLICY_URIstatic final String POLICY_URI - See Also:
- Constant Field Values
 
 - 
TOS_URIstatic final String TOS_URI - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
updateClientvoid updateClient() Deprecated.Do not use, to be removedNotifies other providers that this client has been updated.After a client is updated, providers can register for ClientModel.ClientUpdatedEvent. The setters in this model do not send an update for individual updates of the model. This method is here to allow for sending this event for this client, allowsing for to group multiple changes of a client and signal that all the changes in this client have been performed.
 - 
getIdString getId() Returns client internal ID (UUID).- Specified by:
- getIdin interface- ClientScopeModel
- Specified by:
- getIdin interface- RoleContainerModel
- Returns:
 
 - 
getClientIdString getClientId() Returns client ID as defined by the user.- Returns:
 
 - 
setClientIdvoid setClientId(String clientId) 
 - 
getNameString getName() - Specified by:
- getNamein interface- ClientScopeModel
 
 - 
setNamevoid setName(String name) - Specified by:
- setNamein interface- ClientScopeModel
 
 - 
getDescriptionString getDescription() - Specified by:
- getDescriptionin interface- ClientScopeModel
 
 - 
setDescriptionvoid setDescription(String description) - Specified by:
- setDescriptionin interface- ClientScopeModel
 
 - 
isEnabledboolean isEnabled() 
 - 
setEnabledvoid setEnabled(boolean enabled) 
 - 
isAlwaysDisplayInConsoleboolean isAlwaysDisplayInConsole() 
 - 
setAlwaysDisplayInConsolevoid setAlwaysDisplayInConsole(boolean alwaysDisplayInConsole) 
 - 
isSurrogateAuthRequiredboolean isSurrogateAuthRequired() 
 - 
setSurrogateAuthRequiredvoid setSurrogateAuthRequired(boolean surrogateAuthRequired) 
 - 
addWebOriginvoid addWebOrigin(String webOrigin) 
 - 
removeWebOriginvoid removeWebOrigin(String webOrigin) 
 - 
addRedirectUrivoid addRedirectUri(String redirectUri) 
 - 
removeRedirectUrivoid removeRedirectUri(String redirectUri) 
 - 
getManagementUrlString getManagementUrl() 
 - 
setManagementUrlvoid setManagementUrl(String url) 
 - 
getRootUrlString getRootUrl() 
 - 
setRootUrlvoid setRootUrl(String url) 
 - 
getBaseUrlString getBaseUrl() 
 - 
setBaseUrlvoid setBaseUrl(String url) 
 - 
isBearerOnlyboolean isBearerOnly() 
 - 
setBearerOnlyvoid setBearerOnly(boolean only) 
 - 
getNodeReRegistrationTimeoutint getNodeReRegistrationTimeout() 
 - 
setNodeReRegistrationTimeoutvoid setNodeReRegistrationTimeout(int timeout) 
 - 
getClientAuthenticatorTypeString getClientAuthenticatorType() 
 - 
setClientAuthenticatorTypevoid setClientAuthenticatorType(String clientAuthenticatorType) 
 - 
validateSecretboolean validateSecret(String secret) 
 - 
getSecretString getSecret() 
 - 
setSecretvoid setSecret(String secret) 
 - 
getRegistrationTokenString getRegistrationToken() 
 - 
setRegistrationTokenvoid setRegistrationToken(String registrationToken) 
 - 
getProtocolString getProtocol() - Specified by:
- getProtocolin interface- ClientScopeModel
 
 - 
setProtocolvoid setProtocol(String protocol) - Specified by:
- setProtocolin interface- ClientScopeModel
 
 - 
setAttributevoid setAttribute(String name, String value) - Specified by:
- setAttributein interface- ClientScopeModel
 
 - 
removeAttributevoid removeAttribute(String name) - Specified by:
- removeAttributein interface- ClientScopeModel
 
 - 
getAttributeString getAttribute(String name) - Specified by:
- getAttributein interface- ClientScopeModel
 
 - 
getAttributesMap<String,String> getAttributes() - Specified by:
- getAttributesin interface- ClientScopeModel
 
 - 
getAuthenticationFlowBindingOverrideString getAuthenticationFlowBindingOverride(String binding) Get authentication flow binding override for this client. Allows client to override an authentication flow binding.- Parameters:
- binding- examples are "browser", "direct_grant"
- Returns:
 
 - 
removeAuthenticationFlowBindingOverridevoid removeAuthenticationFlowBindingOverride(String binding) 
 - 
setAuthenticationFlowBindingOverridevoid setAuthenticationFlowBindingOverride(String binding, String flowId) 
 - 
isFrontchannelLogoutboolean isFrontchannelLogout() 
 - 
setFrontchannelLogoutvoid setFrontchannelLogout(boolean flag) 
 - 
isFullScopeAllowedboolean isFullScopeAllowed() 
 - 
setFullScopeAllowedvoid setFullScopeAllowed(boolean value) 
 - 
hasDirectScopedefault boolean hasDirectScope(RoleModel role) Description copied from interface:ScopeContainerModelReturnstrue, if this object has the given role directly in its scope.- Specified by:
- hasDirectScopein interface- ScopeContainerModel
- Parameters:
- role- the role
- Returns:
- see description
- See Also:
- if you want to check whether this object has the given role directly or indirectly in its scope
 
 - 
isPublicClientboolean isPublicClient() 
 - 
setPublicClientvoid setPublicClient(boolean flag) 
 - 
isConsentRequiredboolean isConsentRequired() 
 - 
setConsentRequiredvoid setConsentRequired(boolean consentRequired) 
 - 
isStandardFlowEnabledboolean isStandardFlowEnabled() 
 - 
setStandardFlowEnabledvoid setStandardFlowEnabled(boolean standardFlowEnabled) 
 - 
isImplicitFlowEnabledboolean isImplicitFlowEnabled() 
 - 
setImplicitFlowEnabledvoid setImplicitFlowEnabled(boolean implicitFlowEnabled) 
 - 
isDirectAccessGrantsEnabledboolean isDirectAccessGrantsEnabled() 
 - 
setDirectAccessGrantsEnabledvoid setDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled) 
 - 
isServiceAccountsEnabledboolean isServiceAccountsEnabled() 
 - 
setServiceAccountsEnabledvoid setServiceAccountsEnabled(boolean serviceAccountsEnabled) 
 - 
getRealmRealmModel getRealm() - Specified by:
- getRealmin interface- ClientScopeModel
 
 - 
addClientScopevoid addClientScope(ClientScopeModel clientScope, boolean defaultScope) Add clientScope with this client. Add it as default scope (if parameter 'defaultScope' is true) or optional scope (if parameter 'defaultScope' is false)- Parameters:
- clientScope-
- defaultScope-
 
 - 
addClientScopesvoid addClientScopes(Set<ClientScopeModel> clientScopes, boolean defaultScope) Add clientScopes with this client. Add as default scopes (if parameter 'defaultScope' is true) or optional scopes (if parameter 'defaultScope' is false)- Parameters:
- clientScopes-
- defaultScope-
 
 - 
removeClientScopevoid removeClientScope(ClientScopeModel clientScope) 
 - 
getClientScopesMap<String,ClientScopeModel> getClientScopes(boolean defaultScope) Return all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this client- Parameters:
- defaultScope-
- Returns:
- map where key is the name of the clientScope, value is particular clientScope. Returns empty map if no scopes linked (never returns null).
 
 - 
getDynamicClientScopedefault ClientScopeModel getDynamicClientScope(String scope) Returns a ClientScopeModelassociated with this client.This method is used as a fallback in order to let clients to resolve a scopedynamically which is not listed as default or optional scope when calling#getClientScopes(boolean, boolean).- Parameters:
- scope- the scope name
- Returns:
- the client scope
 
 - 
getNotBeforeint getNotBefore() Time in seconds since epoc- Returns:
 
 - 
setNotBeforevoid setNotBefore(int notBefore) 
 - 
registerNodevoid registerNode(String nodeHost, int registrationTime) Register node or just update the 'lastReRegistration' time if this node is already registered- Parameters:
- nodeHost-
- registrationTime-
 
 - 
unregisterNodevoid unregisterNode(String nodeHost) 
 - 
isDisplayOnConsentScreendefault boolean isDisplayOnConsentScreen() - Specified by:
- isDisplayOnConsentScreenin interface- ClientScopeModel
 
 - 
getConsentScreenTextdefault String getConsentScreenText() - Specified by:
- getConsentScreenTextin interface- ClientScopeModel
 
 
- 
 
-