public class RealmAdapter extends AbstractMongoAdapter<MongoRealmEntity> implements RealmModel
Modifier and Type | Field and Description |
---|---|
protected PrivateKey |
privateKey |
protected PublicKey |
publicKey |
invocationContext
Constructor and Description |
---|
RealmAdapter(KeycloakSession session,
MongoRealmEntity realmEntity,
MongoStoreInvocationContext invocationContext) |
getMongoStore, updateMongoEntity
protected transient volatile PublicKey publicKey
protected transient volatile PrivateKey privateKey
public RealmAdapter(KeycloakSession session, MongoRealmEntity realmEntity, MongoStoreInvocationContext invocationContext)
public String getId()
getId
in interface RealmModel
public String getName()
getName
in interface RealmModel
public void setName(String name)
setName
in interface RealmModel
public boolean isEnabled()
isEnabled
in interface RealmModel
public void setEnabled(boolean enabled)
setEnabled
in interface RealmModel
public SslRequired getSslRequired()
getSslRequired
in interface RealmModel
public void setSslRequired(SslRequired sslRequired)
setSslRequired
in interface RealmModel
public boolean isPasswordCredentialGrantAllowed()
isPasswordCredentialGrantAllowed
in interface RealmModel
public void setPasswordCredentialGrantAllowed(boolean passwordCredentialGrantAllowed)
setPasswordCredentialGrantAllowed
in interface RealmModel
public boolean isRegistrationAllowed()
isRegistrationAllowed
in interface RealmModel
public void setRegistrationAllowed(boolean registrationAllowed)
setRegistrationAllowed
in interface RealmModel
public boolean isRememberMe()
isRememberMe
in interface RealmModel
public void setRememberMe(boolean rememberMe)
setRememberMe
in interface RealmModel
public boolean isBruteForceProtected()
isBruteForceProtected
in interface RealmModel
public void setBruteForceProtected(boolean value)
setBruteForceProtected
in interface RealmModel
public int getMaxFailureWaitSeconds()
getMaxFailureWaitSeconds
in interface RealmModel
public void setMaxFailureWaitSeconds(int val)
setMaxFailureWaitSeconds
in interface RealmModel
public int getWaitIncrementSeconds()
getWaitIncrementSeconds
in interface RealmModel
public void setWaitIncrementSeconds(int val)
setWaitIncrementSeconds
in interface RealmModel
public long getQuickLoginCheckMilliSeconds()
getQuickLoginCheckMilliSeconds
in interface RealmModel
public void setQuickLoginCheckMilliSeconds(long val)
setQuickLoginCheckMilliSeconds
in interface RealmModel
public int getMinimumQuickLoginWaitSeconds()
getMinimumQuickLoginWaitSeconds
in interface RealmModel
public void setMinimumQuickLoginWaitSeconds(int val)
setMinimumQuickLoginWaitSeconds
in interface RealmModel
public int getMaxDeltaTimeSeconds()
getMaxDeltaTimeSeconds
in interface RealmModel
public void setMaxDeltaTimeSeconds(int val)
setMaxDeltaTimeSeconds
in interface RealmModel
public int getFailureFactor()
getFailureFactor
in interface RealmModel
public void setFailureFactor(int failureFactor)
setFailureFactor
in interface RealmModel
public boolean isVerifyEmail()
isVerifyEmail
in interface RealmModel
public void setVerifyEmail(boolean verifyEmail)
setVerifyEmail
in interface RealmModel
public boolean isResetPasswordAllowed()
isResetPasswordAllowed
in interface RealmModel
public void setResetPasswordAllowed(boolean resetPassword)
setResetPasswordAllowed
in interface RealmModel
public boolean isSocial()
isSocial
in interface RealmModel
public void setSocial(boolean social)
setSocial
in interface RealmModel
public boolean isUpdateProfileOnInitialSocialLogin()
isUpdateProfileOnInitialSocialLogin
in interface RealmModel
public void setUpdateProfileOnInitialSocialLogin(boolean updateProfileOnInitialSocialLogin)
setUpdateProfileOnInitialSocialLogin
in interface RealmModel
public PasswordPolicy getPasswordPolicy()
getPasswordPolicy
in interface RealmModel
public void setPasswordPolicy(PasswordPolicy policy)
setPasswordPolicy
in interface RealmModel
public int getNotBefore()
RealmModel
getNotBefore
in interface RealmModel
public void setNotBefore(int notBefore)
setNotBefore
in interface RealmModel
public int getSsoSessionIdleTimeout()
getSsoSessionIdleTimeout
in interface RealmModel
public void setSsoSessionIdleTimeout(int seconds)
setSsoSessionIdleTimeout
in interface RealmModel
public int getSsoSessionMaxLifespan()
getSsoSessionMaxLifespan
in interface RealmModel
public void setSsoSessionMaxLifespan(int seconds)
setSsoSessionMaxLifespan
in interface RealmModel
public int getAccessTokenLifespan()
getAccessTokenLifespan
in interface RealmModel
public void setAccessTokenLifespan(int tokenLifespan)
setAccessTokenLifespan
in interface RealmModel
public int getAccessCodeLifespan()
getAccessCodeLifespan
in interface RealmModel
public void setAccessCodeLifespan(int accessCodeLifespan)
setAccessCodeLifespan
in interface RealmModel
public int getAccessCodeLifespanUserAction()
getAccessCodeLifespanUserAction
in interface RealmModel
public void setAccessCodeLifespanUserAction(int accessCodeLifespanUserAction)
setAccessCodeLifespanUserAction
in interface RealmModel
public String getPublicKeyPem()
getPublicKeyPem
in interface RealmModel
public void setPublicKeyPem(String publicKeyPem)
setPublicKeyPem
in interface RealmModel
public String getPrivateKeyPem()
getPrivateKeyPem
in interface RealmModel
public void setPrivateKeyPem(String privateKeyPem)
setPrivateKeyPem
in interface RealmModel
public PublicKey getPublicKey()
getPublicKey
in interface RealmModel
public void setPublicKey(PublicKey publicKey)
setPublicKey
in interface RealmModel
public PrivateKey getPrivateKey()
getPrivateKey
in interface RealmModel
public void setPrivateKey(PrivateKey privateKey)
setPrivateKey
in interface RealmModel
public String getLoginTheme()
getLoginTheme
in interface RealmModel
public void setLoginTheme(String name)
setLoginTheme
in interface RealmModel
public String getAccountTheme()
getAccountTheme
in interface RealmModel
public void setAccountTheme(String name)
setAccountTheme
in interface RealmModel
public String getAdminTheme()
getAdminTheme
in interface RealmModel
public void setAdminTheme(String name)
setAdminTheme
in interface RealmModel
public String getEmailTheme()
getEmailTheme
in interface RealmModel
public void setEmailTheme(String name)
setEmailTheme
in interface RealmModel
public RoleAdapter getRole(String name)
getRole
in interface RoleContainerModel
public RoleModel addRole(String name)
addRole
in interface RoleContainerModel
public RoleModel addRole(String id, String name)
addRole
in interface RoleContainerModel
public boolean removeRole(RoleModel role)
removeRole
in interface RoleContainerModel
public boolean removeRoleById(String id)
removeRoleById
in interface RealmModel
public Set<RoleModel> getRoles()
getRoles
in interface RoleContainerModel
public RoleModel getRoleById(String id)
getRoleById
in interface RealmModel
public List<String> getDefaultRoles()
getDefaultRoles
in interface RealmModel
public void addDefaultRole(String name)
addDefaultRole
in interface RealmModel
public void updateDefaultRoles(String[] defaultRoles)
updateDefaultRoles
in interface RealmModel
public ClientModel findClient(String clientId)
findClient
in interface RealmModel
public ClientModel findClientById(String id)
findClientById
in interface RealmModel
public ApplicationModel getApplicationById(String id)
getApplicationById
in interface RealmModel
public ApplicationModel getApplicationByName(String name)
getApplicationByName
in interface RealmModel
public Map<String,ApplicationModel> getApplicationNameMap()
getApplicationNameMap
in interface RealmModel
public List<ApplicationModel> getApplications()
getApplications
in interface RealmModel
public ApplicationModel addApplication(String name)
addApplication
in interface RealmModel
public ApplicationModel addApplication(String id, String name)
addApplication
in interface RealmModel
public boolean removeApplication(String id)
removeApplication
in interface RealmModel
public OAuthClientModel addOAuthClient(String name)
addOAuthClient
in interface RealmModel
public OAuthClientModel addOAuthClient(String id, String name)
addOAuthClient
in interface RealmModel
public boolean removeOAuthClient(String id)
removeOAuthClient
in interface RealmModel
public OAuthClientModel getOAuthClient(String name)
getOAuthClient
in interface RealmModel
public OAuthClientModel getOAuthClientById(String id)
getOAuthClientById
in interface RealmModel
public List<OAuthClientModel> getOAuthClients()
getOAuthClients
in interface RealmModel
public void addRequiredCredential(String type)
addRequiredCredential
in interface RealmModel
protected void addRequiredCredential(RequiredCredentialModel credentialModel, List<RequiredCredentialEntity> persistentCollection)
public void updateRequiredCredentials(Set<String> creds)
updateRequiredCredentials
in interface RealmModel
protected void updateRequiredCredentials(Set<String> creds, List<RequiredCredentialEntity> credsEntities)
public List<RequiredCredentialModel> getRequiredCredentials()
getRequiredCredentials
in interface RealmModel
protected List<RequiredCredentialModel> convertRequiredCredentialEntities(Collection<RequiredCredentialEntity> credEntities)
protected void updateRealm()
protected RequiredCredentialModel initRequiredCredentialModel(String type)
public Map<String,String> getBrowserSecurityHeaders()
getBrowserSecurityHeaders
in interface RealmModel
public void setBrowserSecurityHeaders(Map<String,String> headers)
setBrowserSecurityHeaders
in interface RealmModel
public Map<String,String> getSmtpConfig()
getSmtpConfig
in interface RealmModel
public void setSmtpConfig(Map<String,String> smtpConfig)
setSmtpConfig
in interface RealmModel
public Map<String,String> getSocialConfig()
getSocialConfig
in interface RealmModel
public void setSocialConfig(Map<String,String> socialConfig)
setSocialConfig
in interface RealmModel
public UserFederationProviderModel addUserFederationProvider(String providerName, Map<String,String> config, int priority, String displayName, int fullSyncPeriod, int changedSyncPeriod, int lastSync)
addUserFederationProvider
in interface RealmModel
public void removeUserFederationProvider(UserFederationProviderModel provider)
removeUserFederationProvider
in interface RealmModel
public void updateUserFederationProvider(UserFederationProviderModel model)
updateUserFederationProvider
in interface RealmModel
public List<UserFederationProviderModel> getUserFederationProviders()
getUserFederationProviders
in interface RealmModel
public void setUserFederationProviders(List<UserFederationProviderModel> providers)
setUserFederationProviders
in interface RealmModel
public boolean isEventsEnabled()
isEventsEnabled
in interface RealmModel
public void setEventsEnabled(boolean enabled)
setEventsEnabled
in interface RealmModel
public long getEventsExpiration()
getEventsExpiration
in interface RealmModel
public void setEventsExpiration(long expiration)
setEventsExpiration
in interface RealmModel
public Set<String> getEventsListeners()
getEventsListeners
in interface RealmModel
public void setEventsListeners(Set<String> listeners)
setEventsListeners
in interface RealmModel
public ApplicationModel getMasterAdminApp()
getMasterAdminApp
in interface RealmModel
public void setMasterAdminApp(ApplicationModel app)
setMasterAdminApp
in interface RealmModel
public MongoRealmEntity getMongoEntity()
getMongoEntity
in class AbstractMongoAdapter<MongoRealmEntity>
public boolean equals(Object o)
equals
in class AbstractMongoAdapter<MongoRealmEntity>
public int hashCode()
hashCode
in class AbstractMongoAdapter<MongoRealmEntity>
Copyright © 2015. All Rights Reserved.