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.ClientUpdatedEvent
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 TypeFieldDescriptionprotected jakarta.persistence.EntityManager
protected ClientEntity
protected RealmModel
protected KeycloakSession
Fields inherited from interface org.keycloak.models.ClientModel
LOGO_URI, POLICY_URI, PRIVATE_KEY, PUBLIC_KEY, TOS_URI, X509CERTIFICATE
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
-
Constructor Summary
ConstructorDescriptionClientAdapter
(RealmModel realm, jakarta.persistence.EntityManager em, KeycloakSession session, ClientEntity entity) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClientScope
(ClientScopeModel clientScope, boolean defaultScope) void
addClientScopes
(Set<ClientScopeModel> clientScopes, boolean defaultScope) void
addRedirectUri
(String redirectUri) void
addScopeMapping
(RoleModel role) void
addWebOrigin
(String webOrigin) static boolean
void
deleteScopeMapping
(RoleModel role) protected ProtocolMapperModel
entityToModel
(ProtocolMapperEntity entity) boolean
getAttribute
(String name) getClientScopes
(boolean defaultScope) getId()
getName()
int
int
getProtocolMapperByName
(String protocol, String name) protected ProtocolMapperEntity
protected ProtocolMapperEntity
getProtocolMapperEntityByName
(String protocol, String name) getRealm()
getRolesStream
(Integer first, Integer max) int
hashCode()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
registerNode
(String nodeHost, int registrationTime) void
removeAttribute
(String name) void
void
removeClientScope
(ClientScopeModel clientScope) void
removeProtocolMapper
(ProtocolMapperModel mapping) void
removeRedirectUri
(String redirectUri) boolean
removeRole
(RoleModel roleModel) void
removeWebOrigin
(String webOrigin) searchForRolesStream
(String search, Integer first, Integer max) void
setAlwaysDisplayInConsole
(boolean alwaysDisplayInConsole) void
setAttribute
(String name, String value) void
setAuthenticationFlowBindingOverride
(String name, String value) 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) toString()
void
unregisterNode
(String nodeHost) void
void
updateProtocolMapper
(ProtocolMapperModel mapping) boolean
validateSecret
(String secret) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.keycloak.models.ClientModel
getConsentScreenText, getDynamicClientScope, hasDirectScope, isDisplayOnConsentScreen
Methods 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:
getEntity
in interfaceJpaModel<ClientEntity>
-
getId
- Specified by:
getId
in interfaceClientModel
- Specified by:
getId
in interfaceClientScopeModel
- Specified by:
getId
in interfaceRoleContainerModel
-
getRealm
- Specified by:
getRealm
in interfaceClientModel
- Specified by:
getRealm
in interfaceClientScopeModel
-
getName
- Specified by:
getName
in interfaceClientModel
- Specified by:
getName
in interfaceClientScopeModel
-
setName
- Specified by:
setName
in interfaceClientModel
- Specified by:
setName
in interfaceClientScopeModel
-
getDescription
- Specified by:
getDescription
in interfaceClientModel
- Specified by:
getDescription
in interfaceClientScopeModel
-
setDescription
- Specified by:
setDescription
in interfaceClientModel
- Specified by:
setDescription
in interfaceClientScopeModel
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceClientModel
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfaceClientModel
-
isAlwaysDisplayInConsole
public boolean isAlwaysDisplayInConsole()- Specified by:
isAlwaysDisplayInConsole
in interfaceClientModel
-
setAlwaysDisplayInConsole
public void setAlwaysDisplayInConsole(boolean alwaysDisplayInConsole) - Specified by:
setAlwaysDisplayInConsole
in interfaceClientModel
-
isPublicClient
public boolean isPublicClient()- Specified by:
isPublicClient
in interfaceClientModel
-
setPublicClient
public void setPublicClient(boolean flag) - Specified by:
setPublicClient
in interfaceClientModel
-
isFrontchannelLogout
public boolean isFrontchannelLogout()- Specified by:
isFrontchannelLogout
in interfaceClientModel
-
setFrontchannelLogout
public void setFrontchannelLogout(boolean flag) - Specified by:
setFrontchannelLogout
in interfaceClientModel
-
isFullScopeAllowed
public boolean isFullScopeAllowed()- Specified by:
isFullScopeAllowed
in interfaceClientModel
-
setFullScopeAllowed
public void setFullScopeAllowed(boolean value) - Specified by:
setFullScopeAllowed
in interfaceClientModel
-
getWebOrigins
- Specified by:
getWebOrigins
in interfaceClientModel
-
setWebOrigins
- Specified by:
setWebOrigins
in interfaceClientModel
-
addWebOrigin
- Specified by:
addWebOrigin
in interfaceClientModel
-
removeWebOrigin
- Specified by:
removeWebOrigin
in interfaceClientModel
-
getRedirectUris
- Specified by:
getRedirectUris
in interfaceClientModel
-
setRedirectUris
- Specified by:
setRedirectUris
in interfaceClientModel
-
addRedirectUri
- Specified by:
addRedirectUri
in interfaceClientModel
-
removeRedirectUri
- Specified by:
removeRedirectUri
in interfaceClientModel
-
getClientAuthenticatorType
- Specified by:
getClientAuthenticatorType
in interfaceClientModel
-
setClientAuthenticatorType
- Specified by:
setClientAuthenticatorType
in interfaceClientModel
-
getSecret
- Specified by:
getSecret
in interfaceClientModel
-
setSecret
- Specified by:
setSecret
in interfaceClientModel
-
getRegistrationToken
- Specified by:
getRegistrationToken
in interfaceClientModel
-
setRegistrationToken
- Specified by:
setRegistrationToken
in interfaceClientModel
-
validateSecret
- Specified by:
validateSecret
in interfaceClientModel
-
getNotBefore
public int getNotBefore()- Specified by:
getNotBefore
in interfaceClientModel
-
setNotBefore
public void setNotBefore(int notBefore) - Specified by:
setNotBefore
in interfaceClientModel
-
getRealmScopeMappingsStream
- Specified by:
getRealmScopeMappingsStream
in interfaceScopeContainerModel
-
getScopeMappingsStream
- Specified by:
getScopeMappingsStream
in interfaceScopeContainerModel
-
addScopeMapping
- Specified by:
addScopeMapping
in interfaceScopeContainerModel
-
deleteScopeMapping
- Specified by:
deleteScopeMapping
in interfaceScopeContainerModel
-
getProtocol
- Specified by:
getProtocol
in interfaceClientModel
- Specified by:
getProtocol
in interfaceClientScopeModel
-
setProtocol
- Specified by:
setProtocol
in interfaceClientModel
- Specified by:
setProtocol
in interfaceClientScopeModel
-
setAuthenticationFlowBindingOverride
- Specified by:
setAuthenticationFlowBindingOverride
in interfaceClientModel
-
removeAuthenticationFlowBindingOverride
- Specified by:
removeAuthenticationFlowBindingOverride
in interfaceClientModel
-
getAuthenticationFlowBindingOverride
- Specified by:
getAuthenticationFlowBindingOverride
in interfaceClientModel
-
getAuthenticationFlowBindingOverrides
- Specified by:
getAuthenticationFlowBindingOverrides
in interfaceClientModel
-
setAttribute
- Specified by:
setAttribute
in interfaceClientModel
- Specified by:
setAttribute
in interfaceClientScopeModel
-
removeAttribute
- Specified by:
removeAttribute
in interfaceClientModel
- Specified by:
removeAttribute
in interfaceClientScopeModel
-
getAttribute
- Specified by:
getAttribute
in interfaceClientModel
- Specified by:
getAttribute
in interfaceClientScopeModel
-
getAttributes
- Specified by:
getAttributes
in interfaceClientModel
- Specified by:
getAttributes
in interfaceClientScopeModel
-
addClientScope
- Specified by:
addClientScope
in interfaceClientModel
-
addClientScopes
- Specified by:
addClientScopes
in interfaceClientModel
-
removeClientScope
- Specified by:
removeClientScope
in interfaceClientModel
-
getClientScopes
- Specified by:
getClientScopes
in interfaceClientModel
-
contains
-
getProtocolMappersStream
- Specified by:
getProtocolMappersStream
in interfaceProtocolMapperContainerModel
-
addProtocolMapper
- Specified by:
addProtocolMapper
in interfaceProtocolMapperContainerModel
-
getProtocolMapperEntity
-
getProtocolMapperEntityByName
-
removeProtocolMapper
- Specified by:
removeProtocolMapper
in interfaceProtocolMapperContainerModel
-
updateProtocolMapper
- Specified by:
updateProtocolMapper
in interfaceProtocolMapperContainerModel
-
getProtocolMapperById
- Specified by:
getProtocolMapperById
in interfaceProtocolMapperContainerModel
-
getProtocolMapperByName
- Specified by:
getProtocolMapperByName
in interfaceProtocolMapperContainerModel
-
entityToModel
-
updateClient
public void updateClient()- Specified by:
updateClient
in interfaceClientModel
-
getClientId
- Specified by:
getClientId
in interfaceClientModel
-
setClientId
- Specified by:
setClientId
in interfaceClientModel
-
isSurrogateAuthRequired
public boolean isSurrogateAuthRequired()- Specified by:
isSurrogateAuthRequired
in interfaceClientModel
-
setSurrogateAuthRequired
public void setSurrogateAuthRequired(boolean surrogateAuthRequired) - Specified by:
setSurrogateAuthRequired
in interfaceClientModel
-
getManagementUrl
- Specified by:
getManagementUrl
in interfaceClientModel
-
setManagementUrl
- Specified by:
setManagementUrl
in interfaceClientModel
-
getRootUrl
- Specified by:
getRootUrl
in interfaceClientModel
-
setRootUrl
- Specified by:
setRootUrl
in interfaceClientModel
-
getBaseUrl
- Specified by:
getBaseUrl
in interfaceClientModel
-
setBaseUrl
- Specified by:
setBaseUrl
in interfaceClientModel
-
isBearerOnly
public boolean isBearerOnly()- Specified by:
isBearerOnly
in interfaceClientModel
-
setBearerOnly
public void setBearerOnly(boolean only) - Specified by:
setBearerOnly
in interfaceClientModel
-
isConsentRequired
public boolean isConsentRequired()- Specified by:
isConsentRequired
in interfaceClientModel
-
setConsentRequired
public void setConsentRequired(boolean consentRequired) - Specified by:
setConsentRequired
in interfaceClientModel
-
isStandardFlowEnabled
public boolean isStandardFlowEnabled()- Specified by:
isStandardFlowEnabled
in interfaceClientModel
-
setStandardFlowEnabled
public void setStandardFlowEnabled(boolean standardFlowEnabled) - Specified by:
setStandardFlowEnabled
in interfaceClientModel
-
isImplicitFlowEnabled
public boolean isImplicitFlowEnabled()- Specified by:
isImplicitFlowEnabled
in interfaceClientModel
-
setImplicitFlowEnabled
public void setImplicitFlowEnabled(boolean implicitFlowEnabled) - Specified by:
setImplicitFlowEnabled
in interfaceClientModel
-
isDirectAccessGrantsEnabled
public boolean isDirectAccessGrantsEnabled()- Specified by:
isDirectAccessGrantsEnabled
in interfaceClientModel
-
setDirectAccessGrantsEnabled
public void setDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled) - Specified by:
setDirectAccessGrantsEnabled
in interfaceClientModel
-
isServiceAccountsEnabled
public boolean isServiceAccountsEnabled()- Specified by:
isServiceAccountsEnabled
in interfaceClientModel
-
setServiceAccountsEnabled
public void setServiceAccountsEnabled(boolean serviceAccountsEnabled) - Specified by:
setServiceAccountsEnabled
in interfaceClientModel
-
getRole
- Specified by:
getRole
in interfaceRoleContainerModel
-
addRole
- Specified by:
addRole
in interfaceRoleContainerModel
-
addRole
- Specified by:
addRole
in interfaceRoleContainerModel
-
removeRole
- Specified by:
removeRole
in interfaceRoleContainerModel
-
getRolesStream
- Specified by:
getRolesStream
in interfaceRoleContainerModel
-
getRolesStream
- Specified by:
getRolesStream
in interfaceRoleContainerModel
-
searchForRolesStream
- Specified by:
searchForRolesStream
in interfaceRoleContainerModel
-
hasScope
- Specified by:
hasScope
in interfaceScopeContainerModel
-
getNodeReRegistrationTimeout
public int getNodeReRegistrationTimeout()- Specified by:
getNodeReRegistrationTimeout
in interfaceClientModel
-
setNodeReRegistrationTimeout
public void setNodeReRegistrationTimeout(int timeout) - Specified by:
setNodeReRegistrationTimeout
in interfaceClientModel
-
getRegisteredNodes
- Specified by:
getRegisteredNodes
in interfaceClientModel
-
registerNode
- Specified by:
registerNode
in interfaceClientModel
-
unregisterNode
- Specified by:
unregisterNode
in interfaceClientModel
-
equals
-
hashCode
public int hashCode() -
toString
-