Package org.keycloak.models
Interface RealmModel
- All Superinterfaces:
RoleContainerModel
- All Known Subinterfaces:
CachedRealmModel
,StorageProviderRealmModel
- All Known Implementing Classes:
RealmAdapter
,RealmAdapter
,RealmModelDelegate
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
static interface
static interface
Nested classes/interfaces inherited from interface org.keycloak.models.RoleContainerModel
RoleContainerModel.RoleRemovedEvent
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddClientScope
(String name) Creates new client scope with the given name.addClientScope
(String id, String name) Creates new client scope with the given internal ID and name.addComponentModel
(ComponentModel model) Adds component model.void
addDefaultClientScope
(ClientScopeModel clientScope, boolean defaultScope) Adds given client scope among default/optional client scopes of this realm.void
addDefaultGroup
(GroupModel group) void
addIdentityProvider
(IdentityProviderModel identityProvider) Deprecated.Deprecated.UseIDPProvider#createMapper(IdentityProviderMapperModel)
instead.void
addRequiredCredential
(String cred) default void
addToDefaultRoles
(RoleModel role) Adds a role as a composite to default role of this realm.createClientInitialAccessModel
(int expiration, int count) default GroupModel
createGroup
(String name) default GroupModel
createGroup
(String id, String name) createGroup
(String id, String name, GroupModel toParent) default GroupModel
createGroup
(String name, GroupModel toParent) void
createOrUpdateRealmLocalizationTexts
(String locale, Map<String, String> localizationTexts) Creates or updates the realm-specific localization texts for the given locale.void
decreaseRemainingCount
(ClientInitialAccessModel clientInitialAccess) int
int
int
int
int
int
int
int
getActionTokenGeneratedByUserLifespan
(String actionTokenType) Returns clients which are always displayed in the admin console as a stream.getAttribute
(String name) default Boolean
getAttribute
(String name, Boolean defaultValue) default Integer
getAttribute
(String name, Integer defaultValue) default Long
getAttribute
(String name, Long defaultValue) Returns sorted (according to priority)AuthenticationExecutionModel
as a stream.Returns authentications flows as a stream.Returns authentication configs as a stream.getClientByClientId
(String clientId) getClientById
(String id) int
int
Returns all client scopes of this realm as a stream.int
int
Returns clients as a stream.getClientsStream
(Integer firstResult, Integer maxResults) Returns clients as a stream.getComponent
(String id) Returns stream of component models.getComponentsStream
(String parentId) Returns stream of ComponentModels for specific parentId.getComponentsStream
(String parentId, String providerType) Returns stream of ComponentModels for specific parentId and providerType.getDefaultClientScopesStream
(boolean defaultScope) Returns default client scopes of this realm either default ones or optional ones.Returns default groups as a stream.Returns default realm role.Returns enabled event types as a stream.long
Returns events listeners as a stream.int
getFlowByAlias
(String alias) getGroupById
(String id) getGroupsCount
(Boolean onlyTopGroups) getGroupsCountByNameContaining
(String search) Returns groups as a stream.getId()
getIdentityProviderByAlias
(String alias) Deprecated.UseIdentityProviderStorageProvider.getByAlias(String)
instead.Deprecated.UseIDPProvider#getMapperById(String)
instead.getIdentityProviderMapperByName
(String brokerAlias, String name) Deprecated.UseIDPProvider#getMapperByName(String, String)
instead.getIdentityProviderMappersByAliasStream
(String brokerAlias) Deprecated.UseIDPProvider#getMappersByAliasStream(String)
instead.Deprecated.UseIDPProvider#getMappersStream()
instead.Deprecated.UseIdentityProviderStorageProvider.getAllStream()
instead.int
int
int
int
getName()
int
Time in seconds since epocint
int
long
int
Returns sortedRequiredActionProviderModel
as a stream.Returns required credentials as a stream.getRoleById
(String id) int
int
int
int
default Stream<ComponentModel>
getStorageProviders
(Class<? extends Provider> storageProviderClass) Returns stream of ComponentModels that represent StorageProviders for class storageProviderClass in this realm.Returns supported locales as a stream.Deprecated.getTopLevelGroupsStream
(Integer first, Integer max) Deprecated.This method will return a map with all the lifespans available or an empty map, but never null.int
Adds component model.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Deprecated.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
moveGroup
(GroupModel group, GroupModel toParent) void
removeAttribute
(String name) void
void
void
boolean
removeClient
(String id) void
boolean
Removes client scope with givenid
from this realm.void
removeComponent
(ComponentModel component) Removes given component.void
removeComponents
(String parentId) Removes all components with givenparentId
void
removeDefaultClientScope
(ClientScopeModel clientScope) Removes given client scope from default or optional client scopes of this realm.void
removeDefaultGroup
(GroupModel group) boolean
removeGroup
(GroupModel group) void
Deprecated.UseIdentityProviderStorageProvider.remove(String)
instead.void
Deprecated.UseIDPProvider#removeMapper(IdentityProviderMapperModel)
instead.boolean
removeRealmLocalizationTexts
(String locale) void
void
searchClientByAuthenticationFlowBindingOverrides
(Map<String, String> overrides, Integer firstResult, Integer maxResults) searchClientByClientIdStream
(String clientId, Integer firstResult, Integer maxResults) Search for clients by provided client's id.void
setAccessCodeLifespan
(int seconds) void
setAccessCodeLifespanLogin
(int seconds) void
setAccessCodeLifespanUserAction
(int seconds) void
setAccessTokenLifespan
(int seconds) void
setAccessTokenLifespanForImplicitFlow
(int seconds) void
setAccountTheme
(String name) void
setActionTokenGeneratedByAdminLifespan
(int seconds) void
setActionTokenGeneratedByUserLifespan
(int seconds) void
setActionTokenGeneratedByUserLifespan
(String actionTokenType, Integer seconds) void
setAdminEventsDetailsEnabled
(boolean enabled) void
setAdminEventsEnabled
(boolean enabled) void
setAdminTheme
(String name) default void
setAttribute
(String name, Boolean value) default void
setAttribute
(String name, Integer value) default void
setAttribute
(String name, Long value) void
setAttribute
(String name, String value) void
void
setBrowserSecurityHeaders
(Map<String, String> headers) void
setBruteForceProtected
(boolean value) void
void
setClientOfflineSessionIdleTimeout
(int seconds) void
setClientOfflineSessionMaxLifespan
(int seconds) void
setClientSessionIdleTimeout
(int seconds) void
setClientSessionMaxLifespan
(int seconds) void
setDefaultLocale
(String locale) void
setDefaultRole
(RoleModel role) Sets default role for this realmvoid
setDefaultSignatureAlgorithm
(String defaultSignatureAlgorithm) void
void
setDisplayName
(String displayName) void
setDisplayNameHtml
(String displayNameHtml) void
void
setDuplicateEmailsAllowed
(boolean duplicateEmailsAllowed) void
setEditUsernameAllowed
(boolean editUsernameAllowed) void
setEmailTheme
(String name) void
setEnabled
(boolean enabled) void
setEnabledEventTypes
(Set<String> enabledEventTypes) void
setEventsEnabled
(boolean enabled) void
setEventsExpiration
(long expiration) void
setEventsListeners
(Set<String> listeners) void
setFailureFactor
(int failureFactor) void
void
setInternationalizationEnabled
(boolean enabled) void
setLoginTheme
(String name) void
setLoginWithEmailAllowed
(boolean loginWithEmailAllowed) void
setMasterAdminClient
(ClientModel client) void
setMaxDeltaTimeSeconds
(int val) void
setMaxFailureWaitSeconds
(int val) void
setMaxTemporaryLockouts
(int val) void
setMinimumQuickLoginWaitSeconds
(int val) void
void
setNotBefore
(int notBefore) void
setOfflineSessionIdleTimeout
(int seconds) void
setOfflineSessionMaxLifespan
(int seconds) void
setOfflineSessionMaxLifespanEnabled
(boolean offlineSessionMaxLifespanEnabled) void
setOrganizationsEnabled
(boolean organizationsEnabled) void
setOTPPolicy
(OTPPolicy policy) void
setPasswordPolicy
(PasswordPolicy policy) void
setPermanentLockout
(boolean val) void
setQuickLoginCheckMilliSeconds
(long val) void
setRefreshTokenMaxReuse
(int revokeRefreshTokenCount) void
setRegistrationAllowed
(boolean registrationAllowed) void
setRegistrationEmailAsUsername
(boolean registrationEmailAsUsername) void
void
setRememberMe
(boolean rememberMe) void
void
setResetPasswordAllowed
(boolean resetPasswordAllowed) void
setRevokeRefreshToken
(boolean revokeRefreshToken) void
setSmtpConfig
(Map<String, String> smtpConfig) void
setSslRequired
(SslRequired sslRequired) void
setSsoSessionIdleTimeout
(int seconds) void
setSsoSessionIdleTimeoutRememberMe
(int seconds) void
setSsoSessionMaxLifespan
(int seconds) void
setSsoSessionMaxLifespanRememberMe
(int seconds) void
setSupportedLocales
(Set<String> locales) void
setUserManagedAccessAllowed
(boolean userManagedAccessAllowed) void
setVerifyEmail
(boolean verifyEmail) void
setWaitIncrementSeconds
(int val) void
setWebAuthnPolicy
(WebAuthnPolicy policy) Set WebAuthn policy for 2-factor authenticationvoid
Set WebAuthn passwordless policy below.void
void
void
void
updateComponent
(ComponentModel component) Updates component model.void
updateIdentityProvider
(IdentityProviderModel identityProvider) Deprecated.void
Deprecated.UseIDPProvider#updateMapper(IdentityProviderMapperModel)
instead.void
void
void
updateRequiredCredentials
(Set<String> creds) Methods inherited from interface org.keycloak.models.RoleContainerModel
addRole, addRole, getRole, getRolesStream, getRolesStream, removeRole, searchForRolesStream
-
Field Details
-
COMPARE_BY_NAME
-
-
Method Details
-
getId
String getId()- Specified by:
getId
in interfaceRoleContainerModel
-
getName
String getName() -
setName
-
getDisplayName
String getDisplayName() -
setDisplayName
-
getDisplayNameHtml
String getDisplayNameHtml() -
setDisplayNameHtml
-
isEnabled
boolean isEnabled() -
setEnabled
void setEnabled(boolean enabled) -
getSslRequired
SslRequired getSslRequired() -
setSslRequired
-
isRegistrationAllowed
boolean isRegistrationAllowed() -
setRegistrationAllowed
void setRegistrationAllowed(boolean registrationAllowed) -
isRegistrationEmailAsUsername
boolean isRegistrationEmailAsUsername() -
setRegistrationEmailAsUsername
void setRegistrationEmailAsUsername(boolean registrationEmailAsUsername) -
isRememberMe
boolean isRememberMe() -
setRememberMe
void setRememberMe(boolean rememberMe) -
isEditUsernameAllowed
boolean isEditUsernameAllowed() -
setEditUsernameAllowed
void setEditUsernameAllowed(boolean editUsernameAllowed) -
isUserManagedAccessAllowed
boolean isUserManagedAccessAllowed() -
setUserManagedAccessAllowed
void setUserManagedAccessAllowed(boolean userManagedAccessAllowed) -
isOrganizationsEnabled
boolean isOrganizationsEnabled() -
setOrganizationsEnabled
void setOrganizationsEnabled(boolean organizationsEnabled) -
setAttribute
-
setAttribute
-
setAttribute
-
setAttribute
-
removeAttribute
-
getAttribute
-
getAttribute
-
getAttribute
-
getAttribute
-
getAttributes
-
isBruteForceProtected
boolean isBruteForceProtected() -
setBruteForceProtected
void setBruteForceProtected(boolean value) -
isPermanentLockout
boolean isPermanentLockout() -
setPermanentLockout
void setPermanentLockout(boolean val) -
getMaxTemporaryLockouts
int getMaxTemporaryLockouts() -
setMaxTemporaryLockouts
void setMaxTemporaryLockouts(int val) -
getMaxFailureWaitSeconds
int getMaxFailureWaitSeconds() -
setMaxFailureWaitSeconds
void setMaxFailureWaitSeconds(int val) -
getWaitIncrementSeconds
int getWaitIncrementSeconds() -
setWaitIncrementSeconds
void setWaitIncrementSeconds(int val) -
getMinimumQuickLoginWaitSeconds
int getMinimumQuickLoginWaitSeconds() -
setMinimumQuickLoginWaitSeconds
void setMinimumQuickLoginWaitSeconds(int val) -
getQuickLoginCheckMilliSeconds
long getQuickLoginCheckMilliSeconds() -
setQuickLoginCheckMilliSeconds
void setQuickLoginCheckMilliSeconds(long val) -
getMaxDeltaTimeSeconds
int getMaxDeltaTimeSeconds() -
setMaxDeltaTimeSeconds
void setMaxDeltaTimeSeconds(int val) -
getFailureFactor
int getFailureFactor() -
setFailureFactor
void setFailureFactor(int failureFactor) -
isVerifyEmail
boolean isVerifyEmail() -
setVerifyEmail
void setVerifyEmail(boolean verifyEmail) -
isLoginWithEmailAllowed
boolean isLoginWithEmailAllowed() -
setLoginWithEmailAllowed
void setLoginWithEmailAllowed(boolean loginWithEmailAllowed) -
isDuplicateEmailsAllowed
boolean isDuplicateEmailsAllowed() -
setDuplicateEmailsAllowed
void setDuplicateEmailsAllowed(boolean duplicateEmailsAllowed) -
isResetPasswordAllowed
boolean isResetPasswordAllowed() -
setResetPasswordAllowed
void setResetPasswordAllowed(boolean resetPasswordAllowed) -
getDefaultSignatureAlgorithm
String getDefaultSignatureAlgorithm() -
setDefaultSignatureAlgorithm
-
isRevokeRefreshToken
boolean isRevokeRefreshToken() -
setRevokeRefreshToken
void setRevokeRefreshToken(boolean revokeRefreshToken) -
getRefreshTokenMaxReuse
int getRefreshTokenMaxReuse() -
setRefreshTokenMaxReuse
void setRefreshTokenMaxReuse(int revokeRefreshTokenCount) -
getSsoSessionIdleTimeout
int getSsoSessionIdleTimeout() -
setSsoSessionIdleTimeout
void setSsoSessionIdleTimeout(int seconds) -
getSsoSessionMaxLifespan
int getSsoSessionMaxLifespan() -
setSsoSessionMaxLifespan
void setSsoSessionMaxLifespan(int seconds) -
getSsoSessionIdleTimeoutRememberMe
int getSsoSessionIdleTimeoutRememberMe() -
setSsoSessionIdleTimeoutRememberMe
void setSsoSessionIdleTimeoutRememberMe(int seconds) -
getSsoSessionMaxLifespanRememberMe
int getSsoSessionMaxLifespanRememberMe() -
setSsoSessionMaxLifespanRememberMe
void setSsoSessionMaxLifespanRememberMe(int seconds) -
getOfflineSessionIdleTimeout
int getOfflineSessionIdleTimeout() -
setOfflineSessionIdleTimeout
void setOfflineSessionIdleTimeout(int seconds) -
getAccessTokenLifespan
int getAccessTokenLifespan() -
isOfflineSessionMaxLifespanEnabled
boolean isOfflineSessionMaxLifespanEnabled() -
setOfflineSessionMaxLifespanEnabled
void setOfflineSessionMaxLifespanEnabled(boolean offlineSessionMaxLifespanEnabled) -
getOfflineSessionMaxLifespan
int getOfflineSessionMaxLifespan() -
setOfflineSessionMaxLifespan
void setOfflineSessionMaxLifespan(int seconds) -
getClientSessionIdleTimeout
int getClientSessionIdleTimeout() -
setClientSessionIdleTimeout
void setClientSessionIdleTimeout(int seconds) -
getClientSessionMaxLifespan
int getClientSessionMaxLifespan() -
setClientSessionMaxLifespan
void setClientSessionMaxLifespan(int seconds) -
getClientOfflineSessionIdleTimeout
int getClientOfflineSessionIdleTimeout() -
setClientOfflineSessionIdleTimeout
void setClientOfflineSessionIdleTimeout(int seconds) -
getClientOfflineSessionMaxLifespan
int getClientOfflineSessionMaxLifespan() -
setClientOfflineSessionMaxLifespan
void setClientOfflineSessionMaxLifespan(int seconds) -
setAccessTokenLifespan
void setAccessTokenLifespan(int seconds) -
getAccessTokenLifespanForImplicitFlow
int getAccessTokenLifespanForImplicitFlow() -
setAccessTokenLifespanForImplicitFlow
void setAccessTokenLifespanForImplicitFlow(int seconds) -
getAccessCodeLifespan
int getAccessCodeLifespan() -
setAccessCodeLifespan
void setAccessCodeLifespan(int seconds) -
getAccessCodeLifespanUserAction
int getAccessCodeLifespanUserAction() -
setAccessCodeLifespanUserAction
void setAccessCodeLifespanUserAction(int seconds) -
getOAuth2DeviceConfig
OAuth2DeviceConfig getOAuth2DeviceConfig() -
getCibaPolicy
CibaConfig getCibaPolicy() -
getParPolicy
ParConfig getParPolicy() -
getUserActionTokenLifespans
This method will return a map with all the lifespans available or an empty map, but never null.- Returns:
- map with user action token lifespans
-
getAccessCodeLifespanLogin
int getAccessCodeLifespanLogin() -
setAccessCodeLifespanLogin
void setAccessCodeLifespanLogin(int seconds) -
getActionTokenGeneratedByAdminLifespan
int getActionTokenGeneratedByAdminLifespan() -
setActionTokenGeneratedByAdminLifespan
void setActionTokenGeneratedByAdminLifespan(int seconds) -
getActionTokenGeneratedByUserLifespan
int getActionTokenGeneratedByUserLifespan() -
setActionTokenGeneratedByUserLifespan
void setActionTokenGeneratedByUserLifespan(int seconds) -
getActionTokenGeneratedByUserLifespan
-
setActionTokenGeneratedByUserLifespan
-
getRequiredCredentialsStream
Stream<RequiredCredentialModel> getRequiredCredentialsStream()Returns required credentials as a stream.- Returns:
- Stream of
RequiredCredentialModel
. Never returnsnull
.
-
addRequiredCredential
-
getPasswordPolicy
PasswordPolicy getPasswordPolicy() -
setPasswordPolicy
-
getOTPPolicy
OTPPolicy getOTPPolicy() -
setOTPPolicy
-
getWebAuthnPolicy
WebAuthnPolicy getWebAuthnPolicy()- Returns:
- WebAuthn policy for 2-factor authentication
-
setWebAuthnPolicy
Set WebAuthn policy for 2-factor authentication- Parameters:
policy
-
-
getWebAuthnPolicyPasswordless
WebAuthnPolicy getWebAuthnPolicyPasswordless()- Returns:
- WebAuthn passwordless policy below. This is temporary and will be removed later.
-
setWebAuthnPolicyPasswordless
Set WebAuthn passwordless policy below. This is temporary and will be removed later.- Parameters:
policy
-
-
getRoleById
-
getDefaultGroupsStream
Stream<GroupModel> getDefaultGroupsStream()Returns default groups as a stream.- Returns:
- Stream of
GroupModel
. Never returnsnull
.
-
addDefaultGroup
-
removeDefaultGroup
-
getClientsStream
Stream<ClientModel> getClientsStream()Returns clients as a stream.- Returns:
- Stream of
ClientModel
. Never returnsnull
.
-
getClientsStream
Returns clients as a stream.- Parameters:
firstResult
-Integer
Index of the first desired client. Ignored if negative ornull
.maxResults
-Integer
Maximum number of returned clients. Ignored if negative ornull
.- Returns:
- Stream of
ClientModel
. Never returnsnull
.
-
getClientsCount
Long getClientsCount() -
getAlwaysDisplayInConsoleClientsStream
Stream<ClientModel> getAlwaysDisplayInConsoleClientsStream()Returns clients which are always displayed in the admin console as a stream.- Returns:
- Stream of
ClientModel
. Never returnsnull
.
-
addClient
-
addClient
-
removeClient
-
getClientById
-
getClientByClientId
-
searchClientByClientIdStream
Stream<ClientModel> searchClientByClientIdStream(String clientId, Integer firstResult, Integer maxResults) Search for clients by provided client's id.- Parameters:
clientId
-String
Id of the client.firstResult
- Index of the first desired client. Ignored if negative ornull
.maxResults
- Maximum number of returned clients. Ignored if negative ornull
.- Returns:
- Stream of
ClientModel
. Never returnsnull
.
-
searchClientByAttributes
-
searchClientByAuthenticationFlowBindingOverrides
-
updateRequiredCredentials
-
getBrowserSecurityHeaders
-
setBrowserSecurityHeaders
-
getSmtpConfig
-
setSmtpConfig
-
getBrowserFlow
AuthenticationFlowModel getBrowserFlow() -
setBrowserFlow
-
getRegistrationFlow
AuthenticationFlowModel getRegistrationFlow() -
setRegistrationFlow
-
getDirectGrantFlow
AuthenticationFlowModel getDirectGrantFlow() -
setDirectGrantFlow
-
getResetCredentialsFlow
AuthenticationFlowModel getResetCredentialsFlow() -
setResetCredentialsFlow
-
getClientAuthenticationFlow
AuthenticationFlowModel getClientAuthenticationFlow() -
setClientAuthenticationFlow
-
getDockerAuthenticationFlow
AuthenticationFlowModel getDockerAuthenticationFlow() -
setDockerAuthenticationFlow
-
getFirstBrokerLoginFlow
AuthenticationFlowModel getFirstBrokerLoginFlow() -
setFirstBrokerLoginFlow
-
getAuthenticationFlowsStream
Stream<AuthenticationFlowModel> getAuthenticationFlowsStream()Returns authentications flows as a stream.- Returns:
- Stream of
AuthenticationFlowModel
. Never returnsnull
.
-
getFlowByAlias
-
addAuthenticationFlow
-
getAuthenticationFlowById
-
removeAuthenticationFlow
-
updateAuthenticationFlow
-
getAuthenticationExecutionsStream
Returns sorted (according to priority)AuthenticationExecutionModel
as a stream. It should be used with forEachOrdered if the ordering is required.- Parameters:
flowId
-String
Id of the flow.- Returns:
- Sorted stream of
AuthenticationExecutionModel
. Never returnsnull
.
-
getAuthenticationExecutionById
-
getAuthenticationExecutionByFlowId
-
addAuthenticatorExecution
-
updateAuthenticatorExecution
-
removeAuthenticatorExecution
-
getAuthenticatorConfigsStream
Stream<AuthenticatorConfigModel> getAuthenticatorConfigsStream()Returns authentication configs as a stream.- Returns:
- Stream of
AuthenticatorConfigModel
. Never returnsnull
.
-
addAuthenticatorConfig
-
updateAuthenticatorConfig
-
removeAuthenticatorConfig
-
getAuthenticatorConfigById
-
getAuthenticatorConfigByAlias
-
getRequiredActionConfigById
-
getRequiredActionConfigByAlias
-
removeRequiredActionProviderConfig
-
updateRequiredActionConfig
-
getRequiredActionConfigsStream
Stream<RequiredActionConfigModel> getRequiredActionConfigsStream() -
getRequiredActionProvidersStream
Stream<RequiredActionProviderModel> getRequiredActionProvidersStream()Returns sortedRequiredActionProviderModel
as a stream. It should be used with forEachOrdered if the ordering is required.- Returns:
- Sorted stream of
RequiredActionProviderModel
. Never returnsnull
.
-
addRequiredActionProvider
-
updateRequiredActionProvider
-
removeRequiredActionProvider
-
getRequiredActionProviderById
-
getRequiredActionProviderByAlias
-
getIdentityProvidersStream
Deprecated.UseIdentityProviderStorageProvider.getAllStream()
instead.Returns identity providers as a stream.- Returns:
- Stream of
IdentityProviderModel
. Never returnsnull
.
-
getIdentityProviderByAlias
Deprecated.UseIdentityProviderStorageProvider.getByAlias(String)
instead. -
addIdentityProvider
Deprecated. -
removeIdentityProviderByAlias
Deprecated.UseIdentityProviderStorageProvider.remove(String)
instead. -
updateIdentityProvider
Deprecated. -
getIdentityProviderMappersStream
Deprecated.UseIDPProvider#getMappersStream()
instead.Returns identity provider mappers as a stream.- Returns:
- Stream of
IdentityProviderMapperModel
. Never returnsnull
.
-
getIdentityProviderMappersByAliasStream
@Deprecated Stream<IdentityProviderMapperModel> getIdentityProviderMappersByAliasStream(String brokerAlias) Deprecated.UseIDPProvider#getMappersByAliasStream(String)
instead.Returns identity provider mappers by the provided alias as a stream.- Parameters:
brokerAlias
-String
Broker's alias to filter results.- Returns:
- Stream of
IdentityProviderMapperModel
Never returnsnull
.
-
addIdentityProviderMapper
@Deprecated IdentityProviderMapperModel addIdentityProviderMapper(IdentityProviderMapperModel model) Deprecated.UseIDPProvider#createMapper(IdentityProviderMapperModel)
instead. -
removeIdentityProviderMapper
Deprecated.UseIDPProvider#removeMapper(IdentityProviderMapperModel)
instead. -
updateIdentityProviderMapper
Deprecated.UseIDPProvider#updateMapper(IdentityProviderMapperModel)
instead. -
getIdentityProviderMapperById
Deprecated.UseIDPProvider#getMapperById(String)
instead. -
getIdentityProviderMapperByName
@Deprecated IdentityProviderMapperModel getIdentityProviderMapperByName(String brokerAlias, String name) Deprecated.UseIDPProvider#getMapperByName(String, String)
instead. -
addComponentModel
Adds component model. Will call onCreate() method of ComponentFactory- Parameters:
model
-- Returns:
-
importComponentModel
Adds component model. Will NOT call onCreate() method of ComponentFactory- Parameters:
model
-- Returns:
-
updateComponent
Updates component model. Will call onUpdate() method of ComponentFactory- Parameters:
component
- to be updated
-
removeComponent
Removes given component. Will call preRemove() method of ComponentFactory. Also callsthis.removeComponents(component.getId())
.- Parameters:
component
- to be removed
-
removeComponents
Removes all components with givenparentId
- Parameters:
parentId
-String
id of parent
-
getComponentsStream
Returns stream of ComponentModels for specific parentId and providerType.- Parameters:
parentId
-String
id of parentproviderType
-String
type of provider- Returns:
- Stream of
ComponentModel
. Never returnsnull
.
-
getComponentsStream
Returns stream of ComponentModels for specific parentId.- Parameters:
parentId
-String
id of parent- Returns:
- Stream of
ComponentModel
. Never returnsnull
.
-
getComponentsStream
Stream<ComponentModel> getComponentsStream()Returns stream of component models.- Returns:
- Stream of
ComponentModel
. Never returnsnull
.
-
getComponent
-
getStorageProviders
Returns stream of ComponentModels that represent StorageProviders for class storageProviderClass in this realm.- Parameters:
storageProviderClass
-Class<? extends Provider>
- Returns:
- Stream of
ComponentModel
. Never returnsnull
.
-
getLoginTheme
String getLoginTheme() -
setLoginTheme
-
getAccountTheme
String getAccountTheme() -
setAccountTheme
-
getAdminTheme
String getAdminTheme() -
setAdminTheme
-
getEmailTheme
String getEmailTheme() -
setEmailTheme
-
getNotBefore
int getNotBefore()Time in seconds since epoc- Returns:
-
setNotBefore
void setNotBefore(int notBefore) -
isEventsEnabled
boolean isEventsEnabled() -
setEventsEnabled
void setEventsEnabled(boolean enabled) -
getEventsExpiration
long getEventsExpiration() -
setEventsExpiration
void setEventsExpiration(long expiration) -
getEventsListenersStream
Returns events listeners as a stream.- Returns:
- Stream of
String
. Never returnsnull
.
-
setEventsListeners
-
getEnabledEventTypesStream
Returns enabled event types as a stream.- Returns:
- Stream of
String
. Never returnsnull
.
-
setEnabledEventTypes
-
isAdminEventsEnabled
boolean isAdminEventsEnabled() -
setAdminEventsEnabled
void setAdminEventsEnabled(boolean enabled) -
isAdminEventsDetailsEnabled
boolean isAdminEventsDetailsEnabled() -
setAdminEventsDetailsEnabled
void setAdminEventsDetailsEnabled(boolean enabled) -
getMasterAdminClient
ClientModel getMasterAdminClient() -
setMasterAdminClient
-
getDefaultRole
RoleModel getDefaultRole()Returns default realm role. All both realm and client default roles are assigned as composite of this role.- Returns:
- Default role of this realm
-
setDefaultRole
Sets default role for this realm- Parameters:
role
- to be set
-
isIdentityFederationEnabled
Deprecated. -
isInternationalizationEnabled
boolean isInternationalizationEnabled() -
setInternationalizationEnabled
void setInternationalizationEnabled(boolean enabled) -
getSupportedLocalesStream
Returns supported locales as a stream.- Returns:
- Stream of
String
. Never returnsnull
.
-
setSupportedLocales
-
getDefaultLocale
String getDefaultLocale() -
setDefaultLocale
-
createGroup
-
createGroup
-
createGroup
-
createGroup
-
getGroupById
-
getGroupsStream
Stream<GroupModel> getGroupsStream()Returns groups as a stream.- Returns:
- Stream of
GroupModel
. Never returnsnull
.
-
getGroupsCount
-
getGroupsCountByNameContaining
-
getTopLevelGroupsStream
Deprecated. -
getTopLevelGroupsStream
Deprecated. -
removeGroup
-
moveGroup
-
getClientScopesStream
Stream<ClientScopeModel> getClientScopesStream()Returns all client scopes of this realm as a stream.- Returns:
- Stream of
ClientScopeModel
. Never returnsnull
.
-
addClientScope
Creates new client scope with the given name. Internal ID is created automatically. If given name contains spaces, those are replaced by underscores.- Parameters:
name
-String
name of the client scope.- Returns:
- Model of the created client scope.
- Throws:
ModelDuplicateException
- if client scope with same id or name already exists.
-
addClientScope
Creates new client scope with the given internal ID and name. If given name contains spaces, those are replaced by underscores.- Parameters:
id
-String
id of the client scope.name
-String
name of the client scope.- Returns:
- Model of the created client scope.
- Throws:
ModelDuplicateException
- if client scope with same id or name already exists.
-
removeClientScope
Removes client scope with givenid
from this realm.- Parameters:
id
- of the client scope- Returns:
- true if the realm contained the scope and the removal was successful, false otherwise
-
getClientScopeById
- Parameters:
id
- of the client scope- Returns:
- Client scope with the given
id
, ornull
when the scope does not exist.
-
addDefaultClientScope
Adds given client scope among default/optional client scopes of this realm. The scope will be assigned to each new client.- Parameters:
clientScope
- to be addeddefaultScope
- iftrue
the scope will be added among default client scopes, iffalse
it will be added among optional client scopes
-
removeDefaultClientScope
Removes given client scope from default or optional client scopes of this realm.- Parameters:
clientScope
- to be removed
-
createOrUpdateRealmLocalizationTexts
Creates or updates the realm-specific localization texts for the given locale. This method will not delete any text. It updates texts, which are already stored or create new ones if the key does not exist yet. -
removeRealmLocalizationTexts
-
getRealmLocalizationTexts
-
getRealmLocalizationTextsByLocale
-
getDefaultClientScopesStream
Returns default client scopes of this realm either default ones or optional ones.- Parameters:
defaultScope
- iftrue
default client scopes are returned, iffalse
optional client scopes are returned.- Returns:
- Stream of
ClientScopeModel
. Never returnsnull
.
-
addToDefaultRoles
Adds a role as a composite to default role of this realm.- Parameters:
role
- to be added
-
createClientInitialAccessModel
-
getClientInitialAccessModel
-
removeClientInitialAccessModel
-
getClientInitialAccesses
Stream<ClientInitialAccessModel> getClientInitialAccesses() -
decreaseRemainingCount
-
IdentityProviderStorageProvider.create(IdentityProviderModel)
instead.