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, matchPasswordclose, 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, saveDefaultAuthorizationsprotected static final IndentityLogger LOG
public UserEntity createNewUser(String userId)
WritableIdentityProviderReturns 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 WritableIdentityProviderpublic IdentityOperationResult saveUser(User user)
WritableIdentityProviderUser objectsaveUser in interface WritableIdentityProvideruser - a User object.public IdentityOperationResult deleteUser(String userId)
WritableIdentityProviderUser object.deleteUser in interface WritableIdentityProviderpublic boolean checkPassword(String userId, String password)
checkPassword in interface ReadOnlyIdentityProvidercheckPassword in class DbReadOnlyIdentityServiceProviderprotected boolean isUserLocked(UserEntity user)
protected void lockUser(UserEntity user)
public IdentityOperationResult unlockUser(String userId)
WritableIdentityProviderUser object.unlockUser in interface WritableIdentityProvideruserId - the id of the User object to delete.protected IdentityOperationResult unlockUser(UserEntity user)
public GroupEntity createNewGroup(String groupId)
WritableIdentityProviderReturns 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 WritableIdentityProviderpublic IdentityOperationResult saveGroup(Group group)
WritableIdentityProviderGroup object which is not yet persistent.saveGroup in interface WritableIdentityProvidergroup - a group object.public IdentityOperationResult deleteGroup(String groupId)
WritableIdentityProviderGroup object.deleteGroup in interface WritableIdentityProvidergroupId - 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 WritableIdentityProvidertenantId - the id of the new tenantpublic IdentityOperationResult saveTenant(Tenant tenant)
WritableIdentityProviderTenant object which is not yet persistent.saveTenant in interface WritableIdentityProvidertenant - the tenant object to save.public IdentityOperationResult deleteTenant(String tenantId)
WritableIdentityProviderTenant object.deleteTenant in interface WritableIdentityProvidertenantId - the id of the tenant object to delete.public IdentityOperationResult createMembership(String userId, String groupId)
WritableIdentityProvidercreateMembership in interface WritableIdentityProvideruserId - the id of the usergroupId - id of the grouppublic IdentityOperationResult deleteMembership(String userId, String groupId)
WritableIdentityProviderdeleteMembership in interface WritableIdentityProvideruserId - 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)
WritableIdentityProvidercreateTenantUserMembership in interface WritableIdentityProvidertenantId - the id of the tenantuserId - the id of the userpublic IdentityOperationResult createTenantGroupMembership(String tenantId, String groupId)
WritableIdentityProvidercreateTenantGroupMembership in interface WritableIdentityProvidertenantId - the id of the tenantgroupId - the id of the grouppublic IdentityOperationResult deleteTenantUserMembership(String tenantId, String userId)
WritableIdentityProviderdeleteTenantUserMembership in interface WritableIdentityProvidertenantId - the id of the tenantuserId - the id of the userpublic IdentityOperationResult deleteTenantGroupMembership(String tenantId, String groupId)
WritableIdentityProviderdeleteTenantGroupMembership in interface WritableIdentityProvidertenantId - 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.