public class DbIdentityServiceProvider extends DbReadOnlyIdentityServiceProvider implements WritableIdentityProvider
WritableIdentityProvider
implementation backed by a
database. This implementation is used for the built-in user management.
Modifier and Type | Field and Description |
---|---|
protected static IndentityLogger |
LOG |
Constructor and Description |
---|
DbIdentityServiceProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkPassword(String userId,
String password) |
protected void |
createDefaultAuthorizations(Group group) |
protected void |
createDefaultAuthorizations(Tenant tenant) |
protected void |
createDefaultAuthorizations(UserEntity userEntity) |
protected void |
createDefaultMembershipAuthorizations(String userId,
String groupId) |
protected void |
createDefaultTenantMembershipAuthorizations(Tenant tenant,
Group group) |
protected void |
createDefaultTenantMembershipAuthorizations(Tenant tenant,
User user) |
IdentityOperationResult |
createMembership(String userId,
String groupId)
Creates a membership relation between a user and a group.
|
GroupEntity |
createNewGroup(String groupId)
Returns a new (transient)
Group object. |
Tenant |
createNewTenant(String tenantId)
Returns a new (transient)
Tenant object. |
UserEntity |
createNewUser(String userId)
Returns a new (transient)
User object. |
IdentityOperationResult |
createTenantGroupMembership(String tenantId,
String groupId)
Creates a membership relation between a tenant and a group.
|
IdentityOperationResult |
createTenantUserMembership(String tenantId,
String userId)
Creates a membership relation between a tenant and a user.
|
IdentityOperationResult |
deleteGroup(String groupId)
Allows deleting a persistent
Group object. |
IdentityOperationResult |
deleteMembership(String userId,
String groupId)
Deletes a membership relation between a user and a group.
|
protected void |
deleteMembershipsByGroupId(String groupId) |
protected void |
deleteMembershipsByUserId(String userId) |
IdentityOperationResult |
deleteTenant(String tenantId)
Allows deleting a persistent
Tenant object. |
IdentityOperationResult |
deleteTenantGroupMembership(String tenantId,
String groupId)
Deletes a membership relation between a tenant and a group.
|
protected void |
deleteTenantMembershipsOfGroup(String groupId) |
protected void |
deleteTenantMembershipsOfTenant(String tenant) |
protected void |
deleteTenantMembershipsOfUser(String userId) |
IdentityOperationResult |
deleteTenantUserMembership(String tenantId,
String userId)
Deletes a membership relation between a tenant and a user.
|
IdentityOperationResult |
deleteUser(String userId)
Allows deleting a persistent
User object. |
protected boolean |
isUserLocked(UserEntity user) |
protected void |
lockUser(UserEntity user) |
IdentityOperationResult |
saveGroup(Group group)
Allows saving a
Group object which is not yet persistent. |
IdentityOperationResult |
saveTenant(Tenant tenant)
Allows saving a
Tenant object which is not yet persistent. |
IdentityOperationResult |
saveUser(User user)
Allows saving or updates a
User object |
IdentityOperationResult |
unlockUser(String userId)
Allows unlocking a
User object. |
protected IdentityOperationResult |
unlockUser(UserEntity user) |
checkAuthorization, configureQuery, createGroupQuery, createGroupQuery, createNativeUserQuery, createTenantQuery, createTenantQuery, createUserQuery, createUserQuery, existsMembership, existsTenantMembership, findGroupById, findGroupByQueryCriteria, findGroupCountByQueryCriteria, findTenantById, findTenantByQueryCriteria, findTenantCountByQueryCriteria, findUserById, findUserByNativeQuery, findUserByQueryCriteria, findUserCountByNativeQuery, findUserCountByQueryCriteria, matchPassword
close, delete, deleteAuthorizations, deleteAuthorizationsForGroup, deleteAuthorizationsForUser, deleteDefaultAuthorizations, flush, getAttachmentManager, getAuthorizationManager, getBatchManager, getByteArrayManager, getCaseDefinitionManager, getCaseExecutionManager, getCaseInstanceManager, getCommandContext, getCurrentAuthentication, getDbEntityManager, getDbSqlSession, getDecisionDefinitionManager, getDecisionRequirementsDefinitionManager, getDeploymentManager, getEventSubscriptionManager, getHistoricActivityInstanceManager, getHistoricBatchManager, getHistoricCaseActivityInstanceManager, getHistoricCaseInstanceManager, getHistoricDecisionInstanceManager, getHistoricDetailManager, getHistoricExternalTaskLogManager, getHistoricIdentityLinkManager, getHistoricIncidentManager, getHistoricJobLogManager, getHistoricProcessInstanceManager, getHistoricReportManager, getHistoricTaskInstanceManager, getHistoricVariableInstanceManager, getIdentityInfoManager, getIdentityLinkManager, getJobDefinitionManager, getJobManager, getProcessDefinitionManager, getProcessInstanceManager, getResourceAuthorizationProvider, getResourceManager, getSession, getTaskManager, getTaskReportManager, getTenantManager, getUserOperationLogManager, getVariableInstanceManager, insert, isAuthorizationEnabled, saveDefaultAuthorizations
protected static final IndentityLogger LOG
public UserEntity createNewUser(String userId)
WritableIdentityProvider
Returns a new (transient) User
object. The Object is not
yet persistent and must be saved using the WritableIdentityProvider.saveUser(User)
method.
NOTE: the implementation does not validate the uniqueness of the userId parameter at this time.
createNewUser
in interface WritableIdentityProvider
public IdentityOperationResult saveUser(User user)
WritableIdentityProvider
User
objectsaveUser
in interface WritableIdentityProvider
user
- a User object.public IdentityOperationResult deleteUser(String userId)
WritableIdentityProvider
User
object.deleteUser
in interface WritableIdentityProvider
public boolean checkPassword(String userId, String password)
checkPassword
in interface ReadOnlyIdentityProvider
checkPassword
in class DbReadOnlyIdentityServiceProvider
protected boolean isUserLocked(UserEntity user)
protected void lockUser(UserEntity user)
public IdentityOperationResult unlockUser(String userId)
WritableIdentityProvider
User
object.unlockUser
in interface WritableIdentityProvider
userId
- the id of the User object to delete.protected IdentityOperationResult unlockUser(UserEntity user)
public GroupEntity createNewGroup(String groupId)
WritableIdentityProvider
Returns a new (transient) Group
object. The Object is not
yet persistent and must be saved using the WritableIdentityProvider.saveGroup(Group)
method.
NOTE: the implementation does not validate the uniqueness of the groupId parameter at this time.
createNewGroup
in interface WritableIdentityProvider
public IdentityOperationResult saveGroup(Group group)
WritableIdentityProvider
Group
object which is not yet persistent.saveGroup
in interface WritableIdentityProvider
group
- a group object.public IdentityOperationResult deleteGroup(String groupId)
WritableIdentityProvider
Group
object.deleteGroup
in interface WritableIdentityProvider
groupId
- the id of the group object to delete.public Tenant createNewTenant(String tenantId)
WritableIdentityProvider
Returns a new (transient) Tenant
object. The Object is not yet
persistent and must be saved using the WritableIdentityProvider.saveTenant(Tenant)
method.
NOTE: the implementation does not validate the uniqueness of the tenantId parameter at this time.
createNewTenant
in interface WritableIdentityProvider
tenantId
- the id of the new tenantpublic IdentityOperationResult saveTenant(Tenant tenant)
WritableIdentityProvider
Tenant
object which is not yet persistent.saveTenant
in interface WritableIdentityProvider
tenant
- the tenant object to save.public IdentityOperationResult deleteTenant(String tenantId)
WritableIdentityProvider
Tenant
object.deleteTenant
in interface WritableIdentityProvider
tenantId
- the id of the tenant object to delete.public IdentityOperationResult createMembership(String userId, String groupId)
WritableIdentityProvider
createMembership
in interface WritableIdentityProvider
userId
- the id of the usergroupId
- id of the grouppublic IdentityOperationResult deleteMembership(String userId, String groupId)
WritableIdentityProvider
deleteMembership
in interface WritableIdentityProvider
userId
- the id of the usergroupId
- id of the groupprotected void deleteMembershipsByUserId(String userId)
protected void deleteMembershipsByGroupId(String groupId)
public IdentityOperationResult createTenantUserMembership(String tenantId, String userId)
WritableIdentityProvider
createTenantUserMembership
in interface WritableIdentityProvider
tenantId
- the id of the tenantuserId
- the id of the userpublic IdentityOperationResult createTenantGroupMembership(String tenantId, String groupId)
WritableIdentityProvider
createTenantGroupMembership
in interface WritableIdentityProvider
tenantId
- the id of the tenantgroupId
- the id of the grouppublic IdentityOperationResult deleteTenantUserMembership(String tenantId, String userId)
WritableIdentityProvider
deleteTenantUserMembership
in interface WritableIdentityProvider
tenantId
- the id of the tenantuserId
- the id of the userpublic IdentityOperationResult deleteTenantGroupMembership(String tenantId, String groupId)
WritableIdentityProvider
deleteTenantGroupMembership
in interface WritableIdentityProvider
tenantId
- the id of the tenantgroupId
- the id of the groupprotected void deleteTenantMembershipsOfUser(String userId)
protected void deleteTenantMembershipsOfGroup(String groupId)
protected void deleteTenantMembershipsOfTenant(String tenant)
protected void createDefaultAuthorizations(UserEntity userEntity)
protected void createDefaultAuthorizations(Group group)
protected void createDefaultAuthorizations(Tenant tenant)
protected void createDefaultMembershipAuthorizations(String userId, String groupId)
protected void createDefaultTenantMembershipAuthorizations(Tenant tenant, User user)
Copyright © 2022. All rights reserved.