Package org.keycloak.storage.openshift
Class OpenshiftSAClientAdapter
- java.lang.Object
-
- org.keycloak.storage.client.UnsupportedOperationsClientStorageAdapter
-
- org.keycloak.storage.client.AbstractClientStorageAdapter
-
- org.keycloak.storage.client.AbstractReadOnlyClientStorageAdapter
-
- org.keycloak.storage.openshift.OpenshiftSAClientAdapter
-
- All Implemented Interfaces:
ClientModel
,ClientScopeModel
,OrderedModel
,ProtocolMapperContainerModel
,RoleContainerModel
,ScopeContainerModel
public final class OpenshiftSAClientAdapter extends AbstractReadOnlyClientStorageAdapter
- Author:
- Pedro Igor
-
-
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.storage.client.AbstractClientStorageAdapter
component, 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 OpenshiftSAClientAdapter(String clientId, com.openshift.restclient.model.IResource resource, com.openshift.restclient.IClient client, KeycloakSession session, RealmModel realm, ClientStorageProviderModel component)
-
Method Summary
-
Methods inherited from class org.keycloak.storage.client.AbstractReadOnlyClientStorageAdapter
addClientScope, addClientScopes, addProtocolMapper, addRedirectUri, addScopeMapping, addWebOrigin, deleteScopeMapping, removeAttribute, removeAuthenticationFlowBindingOverride, removeClientScope, removeProtocolMapper, removeRedirectUri, removeWebOrigin, setAlwaysDisplayInConsole, setAttribute, setAuthenticationFlowBindingOverride, setBaseUrl, setBearerOnly, setClientAuthenticatorType, setClientId, setConsentRequired, setDescription, setDirectAccessGrantsEnabled, setEnabled, setFrontchannelLogout, setFullScopeAllowed, setImplicitFlowEnabled, setManagementUrl, setName, setNodeReRegistrationTimeout, setNotBefore, setProtocol, setPublicClient, setRedirectUris, setRegistrationToken, setRootUrl, setSecret, setServiceAccountsEnabled, setStandardFlowEnabled, setWebOrigins, updateProtocolMapper
-
Methods inherited from class org.keycloak.storage.client.AbstractClientStorageAdapter
getId, getRealm, getRegisteredNodes, isSurrogateAuthRequired, registerNode, setSurrogateAuthRequired, unregisterNode, updateClient
-
Methods inherited from class org.keycloak.storage.client.UnsupportedOperationsClientStorageAdapter
addDefaultRole, addRole, addRole, getDefaultRolesStream, getRole, getRolesStream, getRolesStream, removeDefaultRoles, removeRole, searchForRolesStream, updateDefaultRoles
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.ClientModel
getConsentScreenText, hasDirectScope
-
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
getDefaultRoles
-
-
-
-
Constructor Detail
-
OpenshiftSAClientAdapter
public OpenshiftSAClientAdapter(String clientId, com.openshift.restclient.model.IResource resource, com.openshift.restclient.IClient client, KeycloakSession session, RealmModel realm, ClientStorageProviderModel component)
-
-
Method Detail
-
getClientId
public String getClientId()
Description copied from interface:ClientModel
Returns client ID as defined by the user.- Returns:
-
getName
public String getName()
-
getDescription
public String getDescription()
-
isEnabled
public boolean isEnabled()
-
isAlwaysDisplayInConsole
public boolean isAlwaysDisplayInConsole()
-
getManagementUrl
public String getManagementUrl()
-
getRootUrl
public String getRootUrl()
-
getBaseUrl
public String getBaseUrl()
-
isBearerOnly
public boolean isBearerOnly()
-
getNodeReRegistrationTimeout
public int getNodeReRegistrationTimeout()
-
getClientAuthenticatorType
public String getClientAuthenticatorType()
-
validateSecret
public boolean validateSecret(String secret)
-
getSecret
public String getSecret()
-
getRegistrationToken
public String getRegistrationToken()
-
getProtocol
public String getProtocol()
-
getAuthenticationFlowBindingOverride
public String getAuthenticationFlowBindingOverride(String binding)
Description copied from interface:ClientModel
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
public Map<String,String> getAuthenticationFlowBindingOverrides()
-
isFrontchannelLogout
public boolean isFrontchannelLogout()
-
isFullScopeAllowed
public boolean isFullScopeAllowed()
-
isPublicClient
public boolean isPublicClient()
-
isConsentRequired
public boolean isConsentRequired()
-
isDisplayOnConsentScreen
public boolean isDisplayOnConsentScreen()
-
isStandardFlowEnabled
public boolean isStandardFlowEnabled()
-
isImplicitFlowEnabled
public boolean isImplicitFlowEnabled()
-
isDirectAccessGrantsEnabled
public boolean isDirectAccessGrantsEnabled()
-
isServiceAccountsEnabled
public boolean isServiceAccountsEnabled()
-
getClientScopes
public Map<String,ClientScopeModel> getClientScopes(boolean defaultScope)
Description copied from interface:ClientModel
Return all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this client- 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
public ClientScopeModel getDynamicClientScope(String scope)
Description copied from interface:ClientModel
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
public int getNotBefore()
Description copied from interface:ClientModel
Time in seconds since epoc- Returns:
-
getProtocolMappersStream
public Stream<ProtocolMapperModel> getProtocolMappersStream()
Description copied from interface:ProtocolMapperContainerModel
Returns protocol mappers as a stream.- Returns:
- Stream of protocol mapper. Never returns
null
.
-
getProtocolMapperById
public ProtocolMapperModel getProtocolMapperById(String id)
-
getProtocolMapperByName
public ProtocolMapperModel getProtocolMapperByName(String protocol, String name)
-
getScopeMappingsStream
public Stream<RoleModel> getScopeMappingsStream()
Description copied from interface:ScopeContainerModel
Returns scope mappings for this scope container as a stream.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getRealmScopeMappingsStream
public Stream<RoleModel> getRealmScopeMappingsStream()
Description copied from interface:ScopeContainerModel
From the scope mappings returned byScopeContainerModel.getScopeMappingsStream()
returns only those that belong to the realm that owns this scope container.- Returns:
- stream of
RoleModel
. Never returnsnull
.
-
hasScope
public boolean hasScope(RoleModel role)
Description copied from interface:ScopeContainerModel
Returnstrue
, if this object has the given role directly or indirectly in its scope,false
otherwise.- 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
-
-