Package org.keycloak.models.jpa
Class ClientAdapter
java.lang.Object
org.keycloak.models.jpa.ClientAdapter
- All Implemented Interfaces:
ClientModel,ClientScopeModel,JpaModel<ClientEntity>,OrderedModel,ProtocolMapperContainerModel,RoleContainerModel,ScopeContainerModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested 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
FieldsModifier and TypeFieldDescriptionprotected jakarta.persistence.EntityManagerprotected ClientEntityprotected RealmModelprotected KeycloakSessionFields 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 -
Constructor Summary
ConstructorsConstructorDescriptionClientAdapter(RealmModel realm, jakarta.persistence.EntityManager em, KeycloakSession session, ClientEntity entity) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClientScope(ClientScopeModel clientScope, boolean defaultScope) voidaddClientScopes(Set<ClientScopeModel> clientScopes, boolean defaultScope) voidaddRedirectUri(String redirectUri) voidaddScopeMapping(RoleModel role) voidaddWebOrigin(String webOrigin) static booleanvoiddeleteScopeMapping(RoleModel role) protected ProtocolMapperModelentityToModel(ProtocolMapperEntity entity) booleangetAttribute(String name) getClientScopes(boolean defaultScope) getId()getName()intintgetProtocolMapperByName(String protocol, String name) protected ProtocolMapperEntityprotected ProtocolMapperEntitygetProtocolMapperEntityByName(String protocol, String name) getRealm()getRolesStream(Integer first, Integer max) inthashCode()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidregisterNode(String nodeHost, int registrationTime) voidremoveAttribute(String name) voidvoidremoveClientScope(ClientScopeModel clientScope) voidremoveProtocolMapper(ProtocolMapperModel mapping) voidremoveRedirectUri(String redirectUri) booleanremoveRole(RoleModel roleModel) voidremoveWebOrigin(String webOrigin) searchForRolesStream(String search, Integer first, Integer max) voidsetAlwaysDisplayInConsole(boolean alwaysDisplayInConsole) voidsetAttribute(String name, String value) voidsetAuthenticationFlowBindingOverride(String name, String value) 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) 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) toString()voidunregisterNode(String nodeHost) voidvoidupdateProtocolMapper(ProtocolMapperModel mapping) booleanvalidateSecret(String secret) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.keycloak.models.ClientModel
getConsentScreenText, getDynamicClientScope, getType, hasDirectScope, isDisplayOnConsentScreen, setTypeMethods inherited from interface org.keycloak.models.ClientScopeModel
getDynamicScopeRegexp, getGuiOrder, isDynamicScope, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope, setIsDynamicScope
-
Field Details
-
session
-
realm
-
em
protected jakarta.persistence.EntityManager em -
entity
-
-
Constructor Details
-
ClientAdapter
public ClientAdapter(RealmModel realm, jakarta.persistence.EntityManager em, KeycloakSession session, ClientEntity entity)
-
-
Method Details
-
getEntity
- Specified by:
getEntityin interfaceJpaModel<ClientEntity>
-
getId
- Specified by:
getIdin interfaceClientModel- Specified by:
getIdin interfaceClientScopeModel- Specified by:
getIdin interfaceRoleContainerModel
-
getRealm
- Specified by:
getRealmin interfaceClientModel- Specified by:
getRealmin interfaceClientScopeModel
-
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
-
isPublicClient
public boolean isPublicClient()- Specified by:
isPublicClientin interfaceClientModel
-
setPublicClient
public void setPublicClient(boolean flag) - Specified by:
setPublicClientin 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
-
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
-
getClientAuthenticatorType
- Specified by:
getClientAuthenticatorTypein interfaceClientModel
-
setClientAuthenticatorType
- Specified by:
setClientAuthenticatorTypein interfaceClientModel
-
getSecret
- Specified by:
getSecretin interfaceClientModel
-
setSecret
- Specified by:
setSecretin interfaceClientModel
-
getRegistrationToken
- Specified by:
getRegistrationTokenin interfaceClientModel
-
setRegistrationToken
- Specified by:
setRegistrationTokenin interfaceClientModel
-
validateSecret
- Specified by:
validateSecretin interfaceClientModel
-
getNotBefore
public int getNotBefore()- Specified by:
getNotBeforein interfaceClientModel
-
setNotBefore
public void setNotBefore(int notBefore) - Specified by:
setNotBeforein interfaceClientModel
-
getRealmScopeMappingsStream
- Specified by:
getRealmScopeMappingsStreamin interfaceScopeContainerModel
-
getScopeMappingsStream
- Specified by:
getScopeMappingsStreamin interfaceScopeContainerModel
-
addScopeMapping
- Specified by:
addScopeMappingin interfaceScopeContainerModel
-
deleteScopeMapping
- Specified by:
deleteScopeMappingin interfaceScopeContainerModel
-
getProtocol
- Specified by:
getProtocolin interfaceClientModel- Specified by:
getProtocolin interfaceClientScopeModel
-
setProtocol
- Specified by:
setProtocolin interfaceClientModel- Specified by:
setProtocolin interfaceClientScopeModel
-
setAuthenticationFlowBindingOverride
- Specified by:
setAuthenticationFlowBindingOverridein interfaceClientModel
-
removeAuthenticationFlowBindingOverride
- Specified by:
removeAuthenticationFlowBindingOverridein interfaceClientModel
-
getAuthenticationFlowBindingOverride
- Specified by:
getAuthenticationFlowBindingOverridein interfaceClientModel
-
getAuthenticationFlowBindingOverrides
- Specified by:
getAuthenticationFlowBindingOverridesin interfaceClientModel
-
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
-
addClientScope
- Specified by:
addClientScopein interfaceClientModel
-
addClientScopes
- Specified by:
addClientScopesin interfaceClientModel
-
removeClientScope
- Specified by:
removeClientScopein interfaceClientModel
-
getClientScopes
- Specified by:
getClientScopesin interfaceClientModel
-
contains
-
getProtocolMappersStream
- Specified by:
getProtocolMappersStreamin interfaceProtocolMapperContainerModel
-
addProtocolMapper
- Specified by:
addProtocolMapperin interfaceProtocolMapperContainerModel
-
getProtocolMapperEntity
-
getProtocolMapperEntityByName
-
removeProtocolMapper
- Specified by:
removeProtocolMapperin interfaceProtocolMapperContainerModel
-
updateProtocolMapper
- Specified by:
updateProtocolMapperin interfaceProtocolMapperContainerModel
-
getProtocolMapperById
- Specified by:
getProtocolMapperByIdin interfaceProtocolMapperContainerModel
-
getProtocolMapperByName
- Specified by:
getProtocolMapperByNamein interfaceProtocolMapperContainerModel
-
entityToModel
-
updateClient
public void updateClient()- Specified by:
updateClientin interfaceClientModel
-
getClientId
- Specified by:
getClientIdin interfaceClientModel
-
setClientId
- Specified by:
setClientIdin interfaceClientModel
-
isSurrogateAuthRequired
public boolean isSurrogateAuthRequired()- Specified by:
isSurrogateAuthRequiredin interfaceClientModel
-
setSurrogateAuthRequired
public void setSurrogateAuthRequired(boolean surrogateAuthRequired) - Specified by:
setSurrogateAuthRequiredin 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
-
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
-
getRole
- Specified by:
getRolein interfaceRoleContainerModel
-
addRole
- Specified by:
addRolein interfaceRoleContainerModel
-
addRole
- Specified by:
addRolein interfaceRoleContainerModel
-
removeRole
- Specified by:
removeRolein interfaceRoleContainerModel
-
getRolesStream
- Specified by:
getRolesStreamin interfaceRoleContainerModel
-
getRolesStream
- Specified by:
getRolesStreamin interfaceRoleContainerModel
-
searchForRolesStream
- Specified by:
searchForRolesStreamin interfaceRoleContainerModel
-
hasScope
- Specified by:
hasScopein interfaceScopeContainerModel
-
getNodeReRegistrationTimeout
public int getNodeReRegistrationTimeout()- Specified by:
getNodeReRegistrationTimeoutin interfaceClientModel
-
setNodeReRegistrationTimeout
public void setNodeReRegistrationTimeout(int timeout) - Specified by:
setNodeReRegistrationTimeoutin interfaceClientModel
-
getRegisteredNodes
- Specified by:
getRegisteredNodesin interfaceClientModel
-
registerNode
- Specified by:
registerNodein interfaceClientModel
-
unregisterNode
- Specified by:
unregisterNodein interfaceClientModel
-
equals
-
hashCode
public int hashCode() -
toString
-