Package org.keycloak.models.light
Class LightweightUserAdapter
java.lang.Object
org.keycloak.models.UserModelDefaultMethods
org.keycloak.storage.adapter.AbstractInMemoryUserAdapter
org.keycloak.models.light.LightweightUserAdapter
- All Implemented Interfaces:
RoleMapperModel
,UserModel
- Author:
- hmlnarik
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.UserModel
UserModel.RequiredAction, UserModel.UserRemovedEvent
-
Field Summary
Fields inherited from class org.keycloak.storage.adapter.AbstractInMemoryUserAdapter
id, realm, session
Fields inherited from interface org.keycloak.models.UserModel
COMPARE_BY_USERNAME, DISABLED_REASON, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
LightweightUserAdapter
(KeycloakSession session, String id) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConsent
(UserConsentModel consent) void
void
addRequiredAction
(String action) void
void
deleteRoleMapping
(RoleModel role) static LightweightUserAdapter
fromString
(KeycloakSession session, RealmModel realm, String serializedForm) getConsentByClient
(String clientInternalId) static String
void
static boolean
static boolean
isLightweightUser
(UserModel user) void
joinGroup
(GroupModel group) void
leaveGroup
(GroupModel group) void
removeAttribute
(String name) void
removeRequiredAction
(String action) void
boolean
revokeConsentForClient
(String clientInternalId) void
setAttribute
(String name, List<String> values) void
setCreatedTimestamp
(Long timestamp) void
setEmailVerified
(boolean verified) void
setEnabled
(boolean enabled) void
setFederationLink
(String link) void
void
setReadonly
(boolean flag) void
setServiceAccountClientLink
(String clientInternalId) void
setSingleAttribute
(String name, String value) void
setUpdateHandler
(Consumer<LightweightUserAdapter> updateHandler) void
setUsername
(String username) void
updateConsent
(UserConsentModel consent) Methods inherited from class org.keycloak.storage.adapter.AbstractInMemoryUserAdapter
checkReadonly, equals, getAttributes, getAttributeStream, getClientRoleMappingsStream, getCreatedTimestamp, getFederationLink, getFirstAttribute, getGroupsStream, getId, getRealmRoleMappingsStream, getRequiredActionsStream, getRoleMappingsStream, getServiceAccountClientLink, getUsername, hashCode, hasRole, isEmailVerified, isEnabled, isMemberOf
Methods inherited from class org.keycloak.models.UserModelDefaultMethods
getEmail, getFirstName, getLastName, setEmail, setFirstName, setLastName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.keycloak.models.RoleMapperModel
hasDirectRole
Methods inherited from interface org.keycloak.models.UserModel
getGroupsCount, getGroupsCountByNameContaining, getGroupsStream
-
Field Details
-
ID_PREFIX
- See Also:
-
-
Constructor Details
-
LightweightUserAdapter
-
LightweightUserAdapter
protected LightweightUserAdapter()
-
-
Method Details
-
isLightweightUser
-
isLightweightUser
-
getLightweightUserId
-
setOwningUserSessionId
-
fromString
public static LightweightUserAdapter fromString(KeycloakSession session, RealmModel realm, String serializedForm) -
credentialManager
-
serialize
-
deleteRoleMapping
- Specified by:
deleteRoleMapping
in interfaceRoleMapperModel
- Overrides:
deleteRoleMapping
in classAbstractInMemoryUserAdapter
-
grantRole
- Specified by:
grantRole
in interfaceRoleMapperModel
- Overrides:
grantRole
in classAbstractInMemoryUserAdapter
-
setServiceAccountClientLink
- Specified by:
setServiceAccountClientLink
in interfaceUserModel
- Overrides:
setServiceAccountClientLink
in classAbstractInMemoryUserAdapter
-
setFederationLink
- Specified by:
setFederationLink
in interfaceUserModel
- Overrides:
setFederationLink
in classAbstractInMemoryUserAdapter
-
leaveGroup
- Specified by:
leaveGroup
in interfaceUserModel
- Overrides:
leaveGroup
in classAbstractInMemoryUserAdapter
-
joinGroup
- Specified by:
joinGroup
in interfaceUserModel
- Overrides:
joinGroup
in classAbstractInMemoryUserAdapter
-
setEmailVerified
public void setEmailVerified(boolean verified) - Specified by:
setEmailVerified
in interfaceUserModel
- Overrides:
setEmailVerified
in classAbstractInMemoryUserAdapter
-
removeRequiredAction
- Specified by:
removeRequiredAction
in interfaceUserModel
- Overrides:
removeRequiredAction
in classAbstractInMemoryUserAdapter
-
addRequiredAction
- Specified by:
addRequiredAction
in interfaceUserModel
- Overrides:
addRequiredAction
in classAbstractInMemoryUserAdapter
-
removeRequiredAction
- Specified by:
removeRequiredAction
in interfaceUserModel
- Overrides:
removeRequiredAction
in classAbstractInMemoryUserAdapter
-
addRequiredAction
- Specified by:
addRequiredAction
in interfaceUserModel
- Overrides:
addRequiredAction
in classAbstractInMemoryUserAdapter
-
removeAttribute
- Specified by:
removeAttribute
in interfaceUserModel
- Overrides:
removeAttribute
in classAbstractInMemoryUserAdapter
-
setAttribute
- Specified by:
setAttribute
in interfaceUserModel
- Overrides:
setAttribute
in classAbstractInMemoryUserAdapter
-
setSingleAttribute
- Specified by:
setSingleAttribute
in interfaceUserModel
- Overrides:
setSingleAttribute
in classAbstractInMemoryUserAdapter
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfaceUserModel
- Overrides:
setEnabled
in classAbstractInMemoryUserAdapter
-
setCreatedTimestamp
- Specified by:
setCreatedTimestamp
in interfaceUserModel
- Overrides:
setCreatedTimestamp
in classAbstractInMemoryUserAdapter
-
setReadonly
public void setReadonly(boolean flag) - Overrides:
setReadonly
in classAbstractInMemoryUserAdapter
-
addDefaults
public void addDefaults()- Overrides:
addDefaults
in classAbstractInMemoryUserAdapter
-
setUsername
- Specified by:
setUsername
in interfaceUserModel
- Overrides:
setUsername
in classAbstractInMemoryUserAdapter
-
setUpdateHandler
-
addConsent
-
getConsentByClient
-
revokeConsentForClient
-
updateConsent
-
getConsentsStream
-