Package org.keycloak.models.delegate
Class ClientModelLazyDelegate
java.lang.Object
org.keycloak.models.delegate.ClientModelLazyDelegate
- All Implemented Interfaces:
ClientModel,ClientScopeModel,OrderedModel,ProtocolMapperContainerModel,RoleContainerModel,ScopeContainerModel
- Direct Known Subclasses:
ClientModelLazyDelegate.WithId,OIDCClientSecretConfigWrapper.ReadOnlyRotatedSecretClientModel,TypeAwareClientModelDelegate
- Author:
- hmlnarik
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.keycloak.models.ClientModel
ClientModel.ClientCreationEvent, ClientModel.ClientIdChangeEvent, ClientModel.ClientProtocolUpdatedEvent, ClientModel.ClientRemovedEvent, ClientModel.ClientUpdatedEventNested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModel
ClientScopeModel.ClientScopeCreatedEvent, ClientScopeModel.ClientScopeRemovedEventNested classes/interfaces inherited from interface org.keycloak.models.OrderedModel
OrderedModel.OrderedModelComparator<OM extends OrderedModel>Nested classes/interfaces inherited from interface org.keycloak.models.RoleContainerModel
RoleContainerModel.RoleRemovedEvent -
Field Summary
Fields inherited from interface org.keycloak.models.ClientModel
LOGO_URI, POLICY_URI, PRIVATE_KEY, PUBLIC_KEY, TOS_URI, TYPE, X509CERTIFICATEFields inherited from interface org.keycloak.models.ClientScopeModel
CONSENT_SCREEN_TEXT, DISPLAY_ON_CONSENT_SCREEN, DYNAMIC_SCOPE_REGEXP, GUI_ORDER, INCLUDE_IN_TOKEN_SCOPE, IS_DYNAMIC_SCOPE, VALUE_SEPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClientScope(ClientScopeModel clientScope, boolean defaultScope) Add clientScope with this client.voidaddClientScopes(Set<ClientScopeModel> clientScopes, boolean defaultScope) Add clientScopes with this client.voidaddRedirectUri(String redirectUri) voidaddScopeMapping(RoleModel role) voidaddWebOrigin(String webOrigin) voiddeleteScopeMapping(RoleModel role) getAttribute(String name) Get authentication flow binding override for this client.Returns client ID as defined by the user.getClientScopes(boolean defaultScope) Return all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this clientgetDynamicClientScope(String scope) Returns aClientScopeModelassociated with this client.getId()Returns client internal ID (UUID).getName()intintTime in seconds since epocgetProtocolMapperByName(String protocol, String name) Returns protocol mappers as a stream.getRealm()From the scope mappings returned byScopeContainerModel.getScopeMappingsStream()returns only those that belong to the realm that owns this scope container.Returns available roles as a stream.getRolesStream(Integer firstResult, Integer maxResults) Returns available roles as a stream.Returns scope mappings for this scope container as a stream.booleanhasDirectScope(RoleModel role) Returnstrue, if this object has the given role directly in its scope.booleanReturnstrue, if this object has the given role directly or indirectly in its scope,falseotherwise.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidregisterNode(String nodeHost, int registrationTime) Register node or just update the 'lastReRegistration' time if this node is already registeredvoidremoveAttribute(String name) voidvoidremoveClientScope(ClientScopeModel clientScope) voidremoveProtocolMapper(ProtocolMapperModel mapping) voidremoveRedirectUri(String redirectUri) booleanremoveRole(RoleModel role) voidremoveWebOrigin(String webOrigin) searchForRolesStream(String search, Integer first, Integer max) Searches roles by the given name.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) voidsetConsentScreenText(String consentScreenText) voidsetDescription(String description) voidsetDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled) voidsetDisplayOnConsentScreen(boolean displayOnConsentScreen) voidsetEnabled(boolean enabled) voidsetFrontchannelLogout(boolean flag) voidsetFullScopeAllowed(boolean value) voidsetGuiOrder(String guiOrder) voidsetImplicitFlowEnabled(boolean implicitFlowEnabled) voidsetIncludeInTokenScope(boolean includeInTokenScope) voidsetIsDynamicScope(boolean isDynamicScope) voidsetManagementUrl(String url) voidvoidsetNodeReRegistrationTimeout(int timeout) voidsetNotBefore(int notBefore) voidsetProtocol(String protocol) voidsetPublicClient(boolean flag) voidsetRedirectUris(Set<String> redirectUris) voidsetRegistrationToken(String registrationToken) voidsetRootUrl(String url) voidvoidsetServiceAccountsEnabled(boolean serviceAccountsEnabled) voidsetStandardFlowEnabled(boolean standardFlowEnabled) voidsetSurrogateAuthRequired(boolean surrogateAuthRequired) voidsetWebOrigins(Set<String> webOrigins) voidunregisterNode(String nodeHost) voidNotifies other providers that this client has been updated.voidupdateProtocolMapper(ProtocolMapperModel mapping) booleanvalidateSecret(String secret) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.ClientModel
getType, setType
-
Constructor Details
-
ClientModelLazyDelegate
-
-
Method Details
-
updateClient
public void updateClient()Description copied from interface:ClientModelNotifies 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.- Specified by:
updateClientin interfaceClientModel- See Also:
-
getId
Description copied from interface:ClientModelReturns client internal ID (UUID).- Specified by:
getIdin interfaceClientModel- Specified by:
getIdin interfaceClientScopeModel- Specified by:
getIdin interfaceRoleContainerModel
-
getClientId
Description copied from interface:ClientModelReturns client ID as defined by the user.- Specified by:
getClientIdin interfaceClientModel- Returns:
-
setClientId
- Specified by:
setClientIdin interfaceClientModel
-
getName
- Specified by:
getNamein interfaceClientModel- Specified by:
getNamein interfaceClientScopeModel
-
setName
- Specified by:
setNamein interfaceClientModel- Specified by:
setNamein interfaceClientScopeModel
-
getDescription
- Specified by:
getDescriptionin interfaceClientModel- Specified by:
getDescriptionin interfaceClientScopeModel
-
setDescription
- Specified by:
setDescriptionin interfaceClientModel- Specified by:
setDescriptionin interfaceClientScopeModel
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceClientModel
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfaceClientModel
-
isAlwaysDisplayInConsole
public boolean isAlwaysDisplayInConsole()- Specified by:
isAlwaysDisplayInConsolein interfaceClientModel
-
setAlwaysDisplayInConsole
public void setAlwaysDisplayInConsole(boolean alwaysDisplayInConsole) - Specified by:
setAlwaysDisplayInConsolein interfaceClientModel
-
isSurrogateAuthRequired
public boolean isSurrogateAuthRequired()- Specified by:
isSurrogateAuthRequiredin interfaceClientModel
-
setSurrogateAuthRequired
public void setSurrogateAuthRequired(boolean surrogateAuthRequired) - Specified by:
setSurrogateAuthRequiredin interfaceClientModel
-
getWebOrigins
- Specified by:
getWebOriginsin interfaceClientModel
-
setWebOrigins
- Specified by:
setWebOriginsin interfaceClientModel
-
addWebOrigin
- Specified by:
addWebOriginin interfaceClientModel
-
removeWebOrigin
- Specified by:
removeWebOriginin interfaceClientModel
-
getRedirectUris
- Specified by:
getRedirectUrisin interfaceClientModel
-
setRedirectUris
- Specified by:
setRedirectUrisin interfaceClientModel
-
addRedirectUri
- Specified by:
addRedirectUriin interfaceClientModel
-
removeRedirectUri
- Specified by:
removeRedirectUriin interfaceClientModel
-
getManagementUrl
- Specified by:
getManagementUrlin interfaceClientModel
-
setManagementUrl
- Specified by:
setManagementUrlin interfaceClientModel
-
getRootUrl
- Specified by:
getRootUrlin interfaceClientModel
-
setRootUrl
- Specified by:
setRootUrlin interfaceClientModel
-
getBaseUrl
- Specified by:
getBaseUrlin interfaceClientModel
-
setBaseUrl
- Specified by:
setBaseUrlin interfaceClientModel
-
isBearerOnly
public boolean isBearerOnly()- Specified by:
isBearerOnlyin interfaceClientModel
-
setBearerOnly
public void setBearerOnly(boolean only) - Specified by:
setBearerOnlyin interfaceClientModel
-
getNodeReRegistrationTimeout
public int getNodeReRegistrationTimeout()- Specified by:
getNodeReRegistrationTimeoutin interfaceClientModel
-
setNodeReRegistrationTimeout
public void setNodeReRegistrationTimeout(int timeout) - Specified by:
setNodeReRegistrationTimeoutin interfaceClientModel
-
getClientAuthenticatorType
- Specified by:
getClientAuthenticatorTypein interfaceClientModel
-
setClientAuthenticatorType
- Specified by:
setClientAuthenticatorTypein interfaceClientModel
-
validateSecret
- Specified by:
validateSecretin interfaceClientModel
-
getSecret
- Specified by:
getSecretin interfaceClientModel
-
setSecret
- Specified by:
setSecretin interfaceClientModel
-
getRegistrationToken
- Specified by:
getRegistrationTokenin interfaceClientModel
-
setRegistrationToken
- Specified by:
setRegistrationTokenin interfaceClientModel
-
getProtocol
- Specified by:
getProtocolin interfaceClientModel- Specified by:
getProtocolin interfaceClientScopeModel
-
setProtocol
- Specified by:
setProtocolin interfaceClientModel- Specified by:
setProtocolin interfaceClientScopeModel
-
setAttribute
- Specified by:
setAttributein interfaceClientModel- Specified by:
setAttributein interfaceClientScopeModel
-
removeAttribute
- Specified by:
removeAttributein interfaceClientModel- Specified by:
removeAttributein interfaceClientScopeModel
-
getAttribute
- Specified by:
getAttributein interfaceClientModel- Specified by:
getAttributein interfaceClientScopeModel
-
getAttributes
- Specified by:
getAttributesin interfaceClientModel- Specified by:
getAttributesin interfaceClientScopeModel
-
getAuthenticationFlowBindingOverride
Description copied from interface:ClientModelGet authentication flow binding override for this client. Allows client to override an authentication flow binding.- Specified by:
getAuthenticationFlowBindingOverridein interfaceClientModel- Parameters:
binding- examples are "browser", "direct_grant"- Returns:
-
getAuthenticationFlowBindingOverrides
- Specified by:
getAuthenticationFlowBindingOverridesin interfaceClientModel
-
removeAuthenticationFlowBindingOverride
- Specified by:
removeAuthenticationFlowBindingOverridein interfaceClientModel
-
setAuthenticationFlowBindingOverride
- Specified by:
setAuthenticationFlowBindingOverridein interfaceClientModel
-
isFrontchannelLogout
public boolean isFrontchannelLogout()- Specified by:
isFrontchannelLogoutin interfaceClientModel
-
setFrontchannelLogout
public void setFrontchannelLogout(boolean flag) - Specified by:
setFrontchannelLogoutin interfaceClientModel
-
isFullScopeAllowed
public boolean isFullScopeAllowed()- Specified by:
isFullScopeAllowedin interfaceClientModel
-
setFullScopeAllowed
public void setFullScopeAllowed(boolean value) - Specified by:
setFullScopeAllowedin interfaceClientModel
-
isPublicClient
public boolean isPublicClient()- Specified by:
isPublicClientin interfaceClientModel
-
setPublicClient
public void setPublicClient(boolean flag) - Specified by:
setPublicClientin interfaceClientModel
-
isConsentRequired
public boolean isConsentRequired()- Specified by:
isConsentRequiredin interfaceClientModel
-
setConsentRequired
public void setConsentRequired(boolean consentRequired) - Specified by:
setConsentRequiredin interfaceClientModel
-
isStandardFlowEnabled
public boolean isStandardFlowEnabled()- Specified by:
isStandardFlowEnabledin interfaceClientModel
-
setStandardFlowEnabled
public void setStandardFlowEnabled(boolean standardFlowEnabled) - Specified by:
setStandardFlowEnabledin interfaceClientModel
-
isImplicitFlowEnabled
public boolean isImplicitFlowEnabled()- Specified by:
isImplicitFlowEnabledin interfaceClientModel
-
setImplicitFlowEnabled
public void setImplicitFlowEnabled(boolean implicitFlowEnabled) - Specified by:
setImplicitFlowEnabledin interfaceClientModel
-
isDirectAccessGrantsEnabled
public boolean isDirectAccessGrantsEnabled()- Specified by:
isDirectAccessGrantsEnabledin interfaceClientModel
-
setDirectAccessGrantsEnabled
public void setDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled) - Specified by:
setDirectAccessGrantsEnabledin interfaceClientModel
-
isServiceAccountsEnabled
public boolean isServiceAccountsEnabled()- Specified by:
isServiceAccountsEnabledin interfaceClientModel
-
setServiceAccountsEnabled
public void setServiceAccountsEnabled(boolean serviceAccountsEnabled) - Specified by:
setServiceAccountsEnabledin interfaceClientModel
-
getRealm
- Specified by:
getRealmin interfaceClientModel- Specified by:
getRealmin interfaceClientScopeModel
-
addClientScope
Description copied from interface:ClientModelAdd clientScope with this client. Add it as default scope (if parameter 'defaultScope' is true) or optional scope (if parameter 'defaultScope' is false)- Specified by:
addClientScopein interfaceClientModel
-
addClientScopes
Description copied from interface:ClientModelAdd clientScopes with this client. Add as default scopes (if parameter 'defaultScope' is true) or optional scopes (if parameter 'defaultScope' is false)- Specified by:
addClientScopesin interfaceClientModel
-
removeClientScope
- Specified by:
removeClientScopein interfaceClientModel
-
getClientScopes
Description copied from interface:ClientModelReturn all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this client- Specified by:
getClientScopesin interfaceClientModel- Returns:
- map where key is the name of the clientScope, value is particular clientScope. Returns empty map if no scopes linked (never returns null).
-
getDynamicClientScope
Description copied from interface:ClientModelReturns 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).- Specified by:
getDynamicClientScopein interfaceClientModel- Parameters:
scope- the scope name- Returns:
- the client scope
-
getNotBefore
public int getNotBefore()Description copied from interface:ClientModelTime in seconds since epoc- Specified by:
getNotBeforein interfaceClientModel- Returns:
-
setNotBefore
public void setNotBefore(int notBefore) - Specified by:
setNotBeforein interfaceClientModel
-
getRegisteredNodes
- Specified by:
getRegisteredNodesin interfaceClientModel
-
registerNode
Description copied from interface:ClientModelRegister node or just update the 'lastReRegistration' time if this node is already registered- Specified by:
registerNodein interfaceClientModel
-
unregisterNode
- Specified by:
unregisterNodein interfaceClientModel
-
isDisplayOnConsentScreen
public boolean isDisplayOnConsentScreen()- Specified by:
isDisplayOnConsentScreenin interfaceClientModel- Specified by:
isDisplayOnConsentScreenin interfaceClientScopeModel
-
getConsentScreenText
- Specified by:
getConsentScreenTextin interfaceClientModel- Specified by:
getConsentScreenTextin interfaceClientScopeModel
-
setDisplayOnConsentScreen
public void setDisplayOnConsentScreen(boolean displayOnConsentScreen) - Specified by:
setDisplayOnConsentScreenin interfaceClientScopeModel
-
setConsentScreenText
- Specified by:
setConsentScreenTextin interfaceClientScopeModel
-
getGuiOrder
- Specified by:
getGuiOrderin interfaceClientScopeModel- Specified by:
getGuiOrderin interfaceOrderedModel
-
setGuiOrder
- Specified by:
setGuiOrderin interfaceClientScopeModel
-
isIncludeInTokenScope
public boolean isIncludeInTokenScope()- Specified by:
isIncludeInTokenScopein interfaceClientScopeModel
-
setIncludeInTokenScope
public void setIncludeInTokenScope(boolean includeInTokenScope) - Specified by:
setIncludeInTokenScopein interfaceClientScopeModel
-
isDynamicScope
public boolean isDynamicScope()- Specified by:
isDynamicScopein interfaceClientScopeModel
-
setIsDynamicScope
public void setIsDynamicScope(boolean isDynamicScope) - Specified by:
setIsDynamicScopein interfaceClientScopeModel
-
getDynamicScopeRegexp
- Specified by:
getDynamicScopeRegexpin interfaceClientScopeModel
-
getScopeMappingsStream
Description copied from interface:ScopeContainerModelReturns scope mappings for this scope container as a stream.- Specified by:
getScopeMappingsStreamin interfaceScopeContainerModel- Returns:
- Stream of
RoleModel. Never returnsnull.
-
getRealmScopeMappingsStream
Description copied from interface:ScopeContainerModelFrom the scope mappings returned byScopeContainerModel.getScopeMappingsStream()returns only those that belong to the realm that owns this scope container.- Specified by:
getRealmScopeMappingsStreamin interfaceScopeContainerModel- Returns:
- stream of
RoleModel. Never returnsnull.
-
addScopeMapping
- Specified by:
addScopeMappingin interfaceScopeContainerModel
-
deleteScopeMapping
- Specified by:
deleteScopeMappingin interfaceScopeContainerModel
-
hasDirectScope
Description copied from interface:ScopeContainerModelReturnstrue, if this object has the given role directly in its scope.- Specified by:
hasDirectScopein interfaceClientModel- Specified by:
hasDirectScopein interfaceScopeContainerModel- Parameters:
role- the role- Returns:
- see description
- See Also:
-
hasScope
Description copied from interface:ScopeContainerModelReturnstrue, if this object has the given role directly or indirectly in its scope,falseotherwise.- Specified by:
hasScopein interfaceScopeContainerModel- Parameters:
role- the role- Returns:
- see description
- See Also:
-
getRole
- Specified by:
getRolein interfaceRoleContainerModel
-
addRole
- Specified by:
addRolein interfaceRoleContainerModel
-
addRole
- Specified by:
addRolein interfaceRoleContainerModel
-
removeRole
- Specified by:
removeRolein interfaceRoleContainerModel
-
getRolesStream
Description copied from interface:RoleContainerModelReturns available roles as a stream.- Specified by:
getRolesStreamin interfaceRoleContainerModel- Returns:
- Stream of
RoleModel. Never returnsnull.
-
getRolesStream
Description copied from interface:RoleContainerModelReturns available roles as a stream.- Specified by:
getRolesStreamin interfaceRoleContainerModel- Parameters:
firstResult-IntegerIndex of the first desired role. Ignored if negative ornull.maxResults-IntegerMaximum number of returned roles. Ignored if negative ornull.- Returns:
- Stream of
RoleModel. Never returnsnull.
-
searchForRolesStream
Description copied from interface:RoleContainerModelSearches roles by the given name. Returns all roles that match the given filter.- Specified by:
searchForRolesStreamin interfaceRoleContainerModel- Parameters:
search-StringName of the role to be used as a filter.first-IntegerIndex of the first desired role. Ignored if negative ornull.max-IntegerMaximum number of returned roles. Ignored if negative ornull.- Returns:
- Stream of
RoleModel. Never returnsnull.
-
getProtocolMappersStream
Description copied from interface:ProtocolMapperContainerModelReturns protocol mappers as a stream.- Specified by:
getProtocolMappersStreamin interfaceProtocolMapperContainerModel- Returns:
- Stream of protocol mapper. Never returns
null.
-
addProtocolMapper
- Specified by:
addProtocolMapperin interfaceProtocolMapperContainerModel
-
removeProtocolMapper
- Specified by:
removeProtocolMapperin interfaceProtocolMapperContainerModel
-
updateProtocolMapper
- Specified by:
updateProtocolMapperin interfaceProtocolMapperContainerModel
-
getProtocolMapperById
- Specified by:
getProtocolMapperByIdin interfaceProtocolMapperContainerModel
-
getProtocolMapperByType
- Specified by:
getProtocolMapperByTypein interfaceProtocolMapperContainerModel
-
getProtocolMapperByName
- Specified by:
getProtocolMapperByNamein interfaceProtocolMapperContainerModel
-