Package org.keycloak.models.map.client
Class MapClientAdapter
- java.lang.Object
-
- org.keycloak.models.map.client.AbstractClientModel<MapClientEntity>
-
- org.keycloak.models.map.client.MapClientAdapter
-
- All Implemented Interfaces:
ClientModel,ClientScopeModel,OrderedModel,ProtocolMapperContainerModel,RoleContainerModel,ScopeContainerModel
public abstract class MapClientAdapter extends AbstractClientModel<MapClientEntity> implements ClientModel
- Author:
- hmlnarik
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.ClientModel
ClientModel.ClientCreationEvent, ClientModel.ClientIdChangeEvent, ClientModel.ClientProtocolUpdatedEvent, ClientModel.ClientRemovedEvent, ClientModel.ClientUpdatedEvent, ClientModel.SearchableFields
-
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
-
Fields inherited from class org.keycloak.models.map.client.AbstractClientModel
entity, realm, session
-
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
Constructors Constructor Description MapClientAdapter(KeycloakSession session, RealmModel realm, MapClientEntity entity)
-
Method Summary
-
Methods inherited from class org.keycloak.models.map.client.AbstractClientModel
addClientScope, addClientScopes, addRole, addRole, equals, getClientScopes, getRealmScopeMappingsStream, getRole, getRolesStream, getRolesStream, hashCode, removeClientScope, removeRole, searchForRolesStream
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.ClientModel
addClientScope, addClientScopes, getClientScopes, getConsentScreenText, getDynamicClientScope, getRegisteredNodes, isDisplayOnConsentScreen, registerNode, removeClientScope, unregisterNode, updateClient
-
Methods inherited from interface org.keycloak.models.ClientScopeModel
getDynamicScopeRegexp, getGuiOrder, isDynamicScope, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope, setIsDynamicScope
-
Methods inherited from interface org.keycloak.models.RoleContainerModel
addRole, addRole, getDefaultRoles, getRole, getRolesStream, getRolesStream, removeRole, searchForRolesStream, updateDefaultRoles
-
Methods inherited from interface org.keycloak.models.ScopeContainerModel
getRealmScopeMappingsStream
-
-
-
-
Constructor Detail
-
MapClientAdapter
public MapClientAdapter(KeycloakSession session, RealmModel realm, MapClientEntity entity)
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:ClientModelReturns client internal ID (UUID).- Specified by:
getIdin interfaceClientModel- Specified by:
getIdin interfaceClientScopeModel- Specified by:
getIdin interfaceRoleContainerModel
-
getClientId
public String getClientId()
Description copied from interface:ClientModelReturns client ID as defined by the user.- Specified by:
getClientIdin interfaceClientModel- Returns:
-
setClientId
public void setClientId(String clientId)
- Specified by:
setClientIdin interfaceClientModel
-
getName
public String getName()
- Specified by:
getNamein interfaceClientModel- Specified by:
getNamein interfaceClientScopeModel
-
setName
public void setName(String name)
- Specified by:
setNamein interfaceClientModel- Specified by:
setNamein interfaceClientScopeModel
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceClientModel- Specified by:
getDescriptionin interfaceClientScopeModel
-
setDescription
public void setDescription(String description)
- 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
public Set<String> getWebOrigins()
- Specified by:
getWebOriginsin interfaceClientModel
-
setWebOrigins
public void setWebOrigins(Set<String> webOrigins)
- Specified by:
setWebOriginsin interfaceClientModel
-
addWebOrigin
public void addWebOrigin(String webOrigin)
- Specified by:
addWebOriginin interfaceClientModel
-
removeWebOrigin
public void removeWebOrigin(String webOrigin)
- Specified by:
removeWebOriginin interfaceClientModel
-
getRedirectUris
public Set<String> getRedirectUris()
- Specified by:
getRedirectUrisin interfaceClientModel
-
setRedirectUris
public void setRedirectUris(Set<String> redirectUris)
- Specified by:
setRedirectUrisin interfaceClientModel
-
addRedirectUri
public void addRedirectUri(String redirectUri)
- Specified by:
addRedirectUriin interfaceClientModel
-
removeRedirectUri
public void removeRedirectUri(String redirectUri)
- Specified by:
removeRedirectUriin interfaceClientModel
-
getManagementUrl
public String getManagementUrl()
- Specified by:
getManagementUrlin interfaceClientModel
-
setManagementUrl
public void setManagementUrl(String url)
- Specified by:
setManagementUrlin interfaceClientModel
-
getRootUrl
public String getRootUrl()
- Specified by:
getRootUrlin interfaceClientModel
-
setRootUrl
public void setRootUrl(String url)
- Specified by:
setRootUrlin interfaceClientModel
-
getBaseUrl
public String getBaseUrl()
- Specified by:
getBaseUrlin interfaceClientModel
-
setBaseUrl
public void setBaseUrl(String url)
- Specified by:
setBaseUrlin interfaceClientModel
-
isBearerOnly
public boolean isBearerOnly()
- Specified by:
isBearerOnlyin interfaceClientModel
-
setBearerOnly
public void setBearerOnly(boolean only)
- Specified by:
setBearerOnlyin interfaceClientModel
-
getClientAuthenticatorType
public String getClientAuthenticatorType()
- Specified by:
getClientAuthenticatorTypein interfaceClientModel
-
setClientAuthenticatorType
public void setClientAuthenticatorType(String clientAuthenticatorType)
- Specified by:
setClientAuthenticatorTypein interfaceClientModel
-
validateSecret
public boolean validateSecret(String secret)
- Specified by:
validateSecretin interfaceClientModel
-
getSecret
public String getSecret()
- Specified by:
getSecretin interfaceClientModel
-
setSecret
public void setSecret(String secret)
- Specified by:
setSecretin interfaceClientModel
-
getNodeReRegistrationTimeout
public int getNodeReRegistrationTimeout()
- Specified by:
getNodeReRegistrationTimeoutin interfaceClientModel
-
setNodeReRegistrationTimeout
public void setNodeReRegistrationTimeout(int timeout)
- Specified by:
setNodeReRegistrationTimeoutin interfaceClientModel
-
getRegistrationToken
public String getRegistrationToken()
- Specified by:
getRegistrationTokenin interfaceClientModel
-
setRegistrationToken
public void setRegistrationToken(String registrationToken)
- Specified by:
setRegistrationTokenin interfaceClientModel
-
getProtocol
public String getProtocol()
- Specified by:
getProtocolin interfaceClientModel- Specified by:
getProtocolin interfaceClientScopeModel
-
setProtocol
public void setProtocol(String protocol)
- Specified by:
setProtocolin interfaceClientModel- Specified by:
setProtocolin interfaceClientScopeModel
-
setAttribute
public void setAttribute(String name, String value)
- Specified by:
setAttributein interfaceClientModel- Specified by:
setAttributein interfaceClientScopeModel
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttributein interfaceClientModel- Specified by:
removeAttributein interfaceClientScopeModel
-
getAttribute
public String getAttribute(String name)
- Specified by:
getAttributein interfaceClientModel- Specified by:
getAttributein interfaceClientScopeModel
-
getAttributes
public Map<String,String> getAttributes()
- Specified by:
getAttributesin interfaceClientModel- Specified by:
getAttributesin interfaceClientScopeModel
-
getAuthenticationFlowBindingOverride
public String getAuthenticationFlowBindingOverride(String binding)
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
public Map<String,String> getAuthenticationFlowBindingOverrides()
- Specified by:
getAuthenticationFlowBindingOverridesin interfaceClientModel
-
removeAuthenticationFlowBindingOverride
public void removeAuthenticationFlowBindingOverride(String binding)
- Specified by:
removeAuthenticationFlowBindingOverridein interfaceClientModel
-
setAuthenticationFlowBindingOverride
public void setAuthenticationFlowBindingOverride(String binding, String flowId)
- 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
public RealmModel getRealm()
- Specified by:
getRealmin interfaceClientModel- Specified by:
getRealmin interfaceClientScopeModel
-
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
-
getScopeMappingsStream
public Stream<RoleModel> getScopeMappingsStream()
Scopes mappings- Specified by:
getScopeMappingsStreamin interfaceScopeContainerModel- Returns:
- Stream of
RoleModel. Never returnsnull.
-
addScopeMapping
public void addScopeMapping(RoleModel role)
- Specified by:
addScopeMappingin interfaceScopeContainerModel
-
deleteScopeMapping
public void deleteScopeMapping(RoleModel role)
- Specified by:
deleteScopeMappingin interfaceScopeContainerModel
-
hasDirectScope
public boolean hasDirectScope(RoleModel role)
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:
if you want to check whether this object has the given role directly or indirectly in its scope
-
hasScope
public boolean hasScope(RoleModel role)
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:
if you want to check if this object has the given role directly in its scope
-
getDefaultRolesStream
@Deprecated public Stream<String> getDefaultRolesStream()
Deprecated.Default roles- Specified by:
getDefaultRolesStreamin interfaceRoleContainerModel- Returns:
- Stream of default roles names or empty stream if there are none. Never returns
null.
-
addDefaultRole
@Deprecated public void addDefaultRole(String name)
Deprecated.- Specified by:
addDefaultRolein interfaceRoleContainerModel
-
removeDefaultRoles
@Deprecated public void removeDefaultRoles(String... defaultRoles)
Deprecated.- Specified by:
removeDefaultRolesin interfaceRoleContainerModel
-
getProtocolMappersStream
public Stream<ProtocolMapperModel> getProtocolMappersStream()
Description copied from interface:ProtocolMapperContainerModelReturns protocol mappers as a stream.- Specified by:
getProtocolMappersStreamin interfaceProtocolMapperContainerModel- Returns:
- Stream of protocol mapper. Never returns
null.
-
addProtocolMapper
public ProtocolMapperModel addProtocolMapper(ProtocolMapperModel model)
- Specified by:
addProtocolMapperin interfaceProtocolMapperContainerModel
-
removeProtocolMapper
public void removeProtocolMapper(ProtocolMapperModel mapping)
- Specified by:
removeProtocolMapperin interfaceProtocolMapperContainerModel
-
updateProtocolMapper
public void updateProtocolMapper(ProtocolMapperModel mapping)
- Specified by:
updateProtocolMapperin interfaceProtocolMapperContainerModel
-
getProtocolMapperById
public ProtocolMapperModel getProtocolMapperById(String id)
- Specified by:
getProtocolMapperByIdin interfaceProtocolMapperContainerModel
-
getProtocolMapperByName
public ProtocolMapperModel getProtocolMapperByName(String protocol, String name)
- Specified by:
getProtocolMapperByNamein interfaceProtocolMapperContainerModel
-
-