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
,UnsupportedOperationsClientStorageAdapter
public interface ClientModel
extends ClientScopeModel, RoleContainerModel, ProtocolMapperContainerModel, ScopeContainerModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
static interface
static interface
static class
Nested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModel
ClientScopeModel.ClientScopeRemovedEvent
Nested 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
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addClientScope
(ClientScopeModel clientScope, boolean defaultScope) Add clientScope with this client.void
addClientScopes
(Set<ClientScopeModel> clientScopes, boolean defaultScope) Add clientScopes with this client.void
addRedirectUri
(String redirectUri) void
addWebOrigin
(String webOrigin) 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 clientdefault String
default ClientScopeModel
getDynamicClientScope
(String scope) Returns aClientScopeModel
associated with this client.getId()
Returns client internal ID (UUID).getName()
int
int
Time in seconds since epocgetRealm()
default boolean
hasDirectScope
(RoleModel role) Returnstrue
, if this object has the given role directly in its scope.boolean
boolean
boolean
boolean
default boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
registerNode
(String nodeHost, int registrationTime) Register node or just update the 'lastReRegistration' time if this node is already registeredvoid
removeAttribute
(String name) void
void
removeClientScope
(ClientScopeModel clientScope) void
removeRedirectUri
(String redirectUri) void
removeWebOrigin
(String webOrigin) void
setAlwaysDisplayInConsole
(boolean alwaysDisplayInConsole) void
setAttribute
(String name, String value) void
setAuthenticationFlowBindingOverride
(String binding, String flowId) void
setBaseUrl
(String url) void
setBearerOnly
(boolean only) void
setClientAuthenticatorType
(String clientAuthenticatorType) void
setClientId
(String clientId) void
setConsentRequired
(boolean consentRequired) void
setDescription
(String description) void
setDirectAccessGrantsEnabled
(boolean directAccessGrantsEnabled) void
setEnabled
(boolean enabled) void
setFrontchannelLogout
(boolean flag) void
setFullScopeAllowed
(boolean value) void
setImplicitFlowEnabled
(boolean implicitFlowEnabled) void
setManagementUrl
(String url) void
void
setNodeReRegistrationTimeout
(int timeout) void
setNotBefore
(int notBefore) void
setProtocol
(String protocol) void
setPublicClient
(boolean flag) void
setRedirectUris
(Set<String> redirectUris) void
setRegistrationToken
(String registrationToken) void
setRootUrl
(String url) void
void
setServiceAccountsEnabled
(boolean serviceAccountsEnabled) void
setStandardFlowEnabled
(boolean standardFlowEnabled) void
setSurrogateAuthRequired
(boolean surrogateAuthRequired) void
setWebOrigins
(Set<String> webOrigins) void
unregisterNode
(String nodeHost) void
Deprecated.Do not use, to be removedboolean
validateSecret
(String secret) Methods inherited from interface org.keycloak.models.ClientScopeModel
getDynamicScopeRegexp, getGuiOrder, isDynamicScope, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope, setIsDynamicScope
Methods inherited from interface org.keycloak.models.ProtocolMapperContainerModel
addProtocolMapper, getProtocolMapperById, getProtocolMapperByName, getProtocolMappersStream, removeProtocolMapper, updateProtocolMapper
Methods inherited from interface org.keycloak.models.RoleContainerModel
addRole, addRole, getRole, getRolesStream, getRolesStream, removeRole, searchForRolesStream
Methods inherited from interface org.keycloak.models.ScopeContainerModel
addScopeMapping, deleteScopeMapping, getRealmScopeMappingsStream, getScopeMappingsStream, hasScope
-
Field Details
-
PRIVATE_KEY
- See Also:
-
PUBLIC_KEY
- See Also:
-
X509CERTIFICATE
- See Also:
-
LOGO_URI
- See Also:
-
POLICY_URI
- See Also:
-
TOS_URI
- See Also:
-
-
Method Details
-
updateClient
void 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. -
getId
String getId()Returns client internal ID (UUID).- Specified by:
getId
in interfaceClientScopeModel
- Specified by:
getId
in interfaceRoleContainerModel
- Returns:
-
getClientId
String getClientId()Returns client ID as defined by the user.- Returns:
-
setClientId
-
getName
String getName()- Specified by:
getName
in interfaceClientScopeModel
-
setName
- Specified by:
setName
in interfaceClientScopeModel
-
getDescription
String getDescription()- Specified by:
getDescription
in interfaceClientScopeModel
-
setDescription
- Specified by:
setDescription
in interfaceClientScopeModel
-
isEnabled
boolean isEnabled() -
setEnabled
void setEnabled(boolean enabled) -
isAlwaysDisplayInConsole
boolean isAlwaysDisplayInConsole() -
setAlwaysDisplayInConsole
void setAlwaysDisplayInConsole(boolean alwaysDisplayInConsole) -
isSurrogateAuthRequired
boolean isSurrogateAuthRequired() -
setSurrogateAuthRequired
void setSurrogateAuthRequired(boolean surrogateAuthRequired) -
getWebOrigins
-
setWebOrigins
-
addWebOrigin
-
removeWebOrigin
-
getRedirectUris
-
setRedirectUris
-
addRedirectUri
-
removeRedirectUri
-
getManagementUrl
String getManagementUrl() -
setManagementUrl
-
getRootUrl
String getRootUrl() -
setRootUrl
-
getBaseUrl
String getBaseUrl() -
setBaseUrl
-
isBearerOnly
boolean isBearerOnly() -
setBearerOnly
void setBearerOnly(boolean only) -
getNodeReRegistrationTimeout
int getNodeReRegistrationTimeout() -
setNodeReRegistrationTimeout
void setNodeReRegistrationTimeout(int timeout) -
getClientAuthenticatorType
String getClientAuthenticatorType() -
setClientAuthenticatorType
-
validateSecret
-
getSecret
String getSecret() -
setSecret
-
getRegistrationToken
String getRegistrationToken() -
setRegistrationToken
-
getProtocol
String getProtocol()- Specified by:
getProtocol
in interfaceClientScopeModel
-
setProtocol
- Specified by:
setProtocol
in interfaceClientScopeModel
-
setAttribute
- Specified by:
setAttribute
in interfaceClientScopeModel
-
removeAttribute
- Specified by:
removeAttribute
in interfaceClientScopeModel
-
getAttribute
- Specified by:
getAttribute
in interfaceClientScopeModel
-
getAttributes
- Specified by:
getAttributes
in interfaceClientScopeModel
-
getAuthenticationFlowBindingOverride
Get authentication flow binding override for this client. Allows client to override an authentication flow binding.- Parameters:
binding
- examples are "browser", "direct_grant"- Returns:
-
getAuthenticationFlowBindingOverrides
-
removeAuthenticationFlowBindingOverride
-
setAuthenticationFlowBindingOverride
-
isFrontchannelLogout
boolean isFrontchannelLogout() -
setFrontchannelLogout
void setFrontchannelLogout(boolean flag) -
isFullScopeAllowed
boolean isFullScopeAllowed() -
setFullScopeAllowed
void setFullScopeAllowed(boolean value) -
hasDirectScope
Description copied from interface:ScopeContainerModel
Returnstrue
, if this object has the given role directly in its scope.- Specified by:
hasDirectScope
in interfaceScopeContainerModel
- Parameters:
role
- the role- Returns:
- see description
- See Also:
-
isPublicClient
boolean isPublicClient() -
setPublicClient
void setPublicClient(boolean flag) -
isConsentRequired
boolean isConsentRequired() -
setConsentRequired
void setConsentRequired(boolean consentRequired) -
isStandardFlowEnabled
boolean isStandardFlowEnabled() -
setStandardFlowEnabled
void setStandardFlowEnabled(boolean standardFlowEnabled) -
isImplicitFlowEnabled
boolean isImplicitFlowEnabled() -
setImplicitFlowEnabled
void setImplicitFlowEnabled(boolean implicitFlowEnabled) -
isDirectAccessGrantsEnabled
boolean isDirectAccessGrantsEnabled() -
setDirectAccessGrantsEnabled
void setDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled) -
isServiceAccountsEnabled
boolean isServiceAccountsEnabled() -
setServiceAccountsEnabled
void setServiceAccountsEnabled(boolean serviceAccountsEnabled) -
getRealm
RealmModel getRealm()- Specified by:
getRealm
in interfaceClientScopeModel
-
addClientScope
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
-
-
addClientScopes
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
-
-
removeClientScope
-
getClientScopes
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).
-
getDynamicClientScope
Returns a
ClientScopeModel
associated with this client.This method is used as a fallback in order to let clients to resolve a
scope
dynamically which is not listed as default or optional scope when calling#getClientScopes(boolean, boolean)
.- Parameters:
scope
- the scope name- Returns:
- the client scope
-
getNotBefore
int getNotBefore()Time in seconds since epoc- Returns:
-
setNotBefore
void setNotBefore(int notBefore) -
getRegisteredNodes
-
registerNode
Register node or just update the 'lastReRegistration' time if this node is already registered- Parameters:
nodeHost
-registrationTime
-
-
unregisterNode
-
isDisplayOnConsentScreen
default boolean isDisplayOnConsentScreen()- Specified by:
isDisplayOnConsentScreen
in interfaceClientScopeModel
-
getConsentScreenText
- Specified by:
getConsentScreenText
in interfaceClientScopeModel
-