public abstract class AbstractUserAdapterFederatedStorage extends Object implements UserModel
UserModel.RequiredAction, UserModel.UserRemovedEvent
Modifier and Type | Field and Description |
---|---|
static String |
CREATED_TIMESTAMP_ATTRIBUTE |
static String |
EMAIL_ATTRIBUTE |
static String |
EMAIL_VERIFIED_ATTRIBUTE |
static String |
ENABLED_ATTRIBUTE |
static String |
FIRST_NAME_ATTRIBUTE |
static String |
LAST_NAME_ATTRIBUTE |
static String |
OTP_ENABLED_ATTRIBUTE |
protected RealmModel |
realm |
protected KeycloakSession |
session |
protected StorageId |
storageId |
protected ComponentModel |
storageProviderModel |
Constructor and Description |
---|
AbstractUserAdapterFederatedStorage(KeycloakSession session,
RealmModel realm,
ComponentModel storageProviderModel) |
Modifier and Type | Method and Description |
---|---|
void |
addRequiredAction(String action) |
void |
addRequiredAction(UserModel.RequiredAction action) |
protected boolean |
appendDefaultGroups()
Should the realm's default groups be appended to getGroups() call?
If your storage provider is not managing group mappings then it is recommended that
this method return true
|
protected boolean |
appendDefaultRolesToRoleMappings()
Should the realm's default roles be appended to getRoleMappings() call?
If your storage provider is not managing all role mappings then it is recommended that
this method return true
|
void |
deleteRoleMapping(RoleModel role) |
boolean |
equals(Object o) |
List<String> |
getAttribute(String name) |
Map<String,List<String>> |
getAttributes() |
Set<RoleModel> |
getClientRoleMappings(ClientModel app) |
Long |
getCreatedTimestamp()
Get timestamp of user creation.
|
List<UserCredentialValueModel> |
getCredentialsDirectly() |
String |
getEmail() |
protected Set<RoleModel> |
getFederatedRoleMappings() |
UserFederatedStorageProvider |
getFederatedStorage() |
String |
getFederationLink()
This method should not be overriden
|
String |
getFirstAttribute(String name) |
String |
getFirstName() |
Set<GroupModel> |
getGroups() |
protected Set<GroupModel> |
getGroupsInternal()
Get group membership mappings that are managed by this storage provider
|
String |
getId()
Defaults to 'f:' + storageProvider.getId() + ':' + getUsername()
|
String |
getLastName() |
Set<RoleModel> |
getRealmRoleMappings() |
Set<String> |
getRequiredActions() |
Set<RoleModel> |
getRoleMappings() |
protected Set<RoleModel> |
getRoleMappingsInternal() |
String |
getServiceAccountClientLink()
This method should not be overriden
|
void |
grantRole(RoleModel role) |
int |
hashCode() |
boolean |
hasRole(RoleModel role) |
boolean |
isEmailVerified() |
boolean |
isEnabled() |
boolean |
isMemberOf(GroupModel group) |
boolean |
isOtpEnabled() |
void |
joinGroup(GroupModel group) |
void |
leaveGroup(GroupModel group) |
void |
removeAttribute(String name) |
void |
removeRequiredAction(String action) |
void |
removeRequiredAction(UserModel.RequiredAction action) |
void |
setAttribute(String name,
List<String> values) |
void |
setCreatedTimestamp(Long timestamp) |
void |
setEmail(String email) |
void |
setEmailVerified(boolean verified) |
void |
setEnabled(boolean enabled) |
void |
setFederationLink(String link)
This method should not be overriden
|
void |
setFirstName(String firstName) |
void |
setLastName(String lastName) |
void |
setOtpEnabled(boolean totp) |
void |
setServiceAccountClientLink(String clientInternalId)
This method should not be overriden
|
void |
setSingleAttribute(String name,
String value)
Set single value of specified attribute.
|
void |
updateCredential(UserCredentialModel cred) |
void |
updateCredentialDirectly(UserCredentialValueModel cred) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getUsername, setUsername
public static String FIRST_NAME_ATTRIBUTE
public static String LAST_NAME_ATTRIBUTE
public static String EMAIL_ATTRIBUTE
public static String EMAIL_VERIFIED_ATTRIBUTE
public static String CREATED_TIMESTAMP_ATTRIBUTE
public static String ENABLED_ATTRIBUTE
public static String OTP_ENABLED_ATTRIBUTE
protected KeycloakSession session
protected RealmModel realm
protected ComponentModel storageProviderModel
protected StorageId storageId
public AbstractUserAdapterFederatedStorage(KeycloakSession session, RealmModel realm, ComponentModel storageProviderModel)
public UserFederatedStorageProvider getFederatedStorage()
public Set<String> getRequiredActions()
getRequiredActions
in interface UserModel
public void addRequiredAction(String action)
addRequiredAction
in interface UserModel
public void removeRequiredAction(String action)
removeRequiredAction
in interface UserModel
public void addRequiredAction(UserModel.RequiredAction action)
addRequiredAction
in interface UserModel
public void removeRequiredAction(UserModel.RequiredAction action)
removeRequiredAction
in interface UserModel
protected Set<GroupModel> getGroupsInternal()
protected boolean appendDefaultGroups()
public Set<GroupModel> getGroups()
public void joinGroup(GroupModel group)
public void leaveGroup(GroupModel group)
leaveGroup
in interface UserModel
public boolean isMemberOf(GroupModel group)
isMemberOf
in interface UserModel
public Set<RoleModel> getRealmRoleMappings()
getRealmRoleMappings
in interface RoleMapperModel
public Set<RoleModel> getClientRoleMappings(ClientModel app)
getClientRoleMappings
in interface RoleMapperModel
public boolean hasRole(RoleModel role)
hasRole
in interface RoleMapperModel
public void grantRole(RoleModel role)
grantRole
in interface RoleMapperModel
protected boolean appendDefaultRolesToRoleMappings()
public Set<RoleModel> getRoleMappings()
getRoleMappings
in interface RoleMapperModel
public void deleteRoleMapping(RoleModel role)
deleteRoleMapping
in interface RoleMapperModel
public void setEnabled(boolean enabled)
setEnabled
in interface UserModel
public boolean isOtpEnabled()
isOtpEnabled
in interface UserModel
public void setOtpEnabled(boolean totp)
setOtpEnabled
in interface UserModel
public String getFederationLink()
getFederationLink
in interface UserModel
public void setFederationLink(String link)
setFederationLink
in interface UserModel
public String getServiceAccountClientLink()
getServiceAccountClientLink
in interface UserModel
public void setServiceAccountClientLink(String clientInternalId)
setServiceAccountClientLink
in interface UserModel
public String getId()
public Long getCreatedTimestamp()
UserModel
getCreatedTimestamp
in interface UserModel
public void setCreatedTimestamp(Long timestamp)
setCreatedTimestamp
in interface UserModel
public void setSingleAttribute(String name, String value)
UserModel
setSingleAttribute
in interface UserModel
public void removeAttribute(String name)
removeAttribute
in interface UserModel
public void setAttribute(String name, List<String> values)
setAttribute
in interface UserModel
public String getFirstAttribute(String name)
getFirstAttribute
in interface UserModel
public Map<String,List<String>> getAttributes()
getAttributes
in interface UserModel
public List<String> getAttribute(String name)
getAttribute
in interface UserModel
public String getFirstName()
getFirstName
in interface UserModel
public void setFirstName(String firstName)
setFirstName
in interface UserModel
public String getLastName()
getLastName
in interface UserModel
public void setLastName(String lastName)
setLastName
in interface UserModel
public boolean isEmailVerified()
isEmailVerified
in interface UserModel
public void setEmailVerified(boolean verified)
setEmailVerified
in interface UserModel
public void updateCredential(UserCredentialModel cred)
updateCredential
in interface UserModel
public List<UserCredentialValueModel> getCredentialsDirectly()
getCredentialsDirectly
in interface UserModel
public void updateCredentialDirectly(UserCredentialValueModel cred)
updateCredentialDirectly
in interface UserModel
Copyright © 2016 JBoss by Red Hat. All rights reserved.