Class DbIdentityServiceProvider
- All Implemented Interfaces:
ReadOnlyIdentityProvider,WritableIdentityProvider,Session
- Direct Known Subclasses:
OAuth2IdentityProvider
WritableIdentityProvider implementation backed by a
database. This implementation is used for the built-in user management.
- Author:
- Daniel Meyer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPassword(String userId, String password) protected voidcreateDefaultAuthorizations(Group group) protected voidcreateDefaultAuthorizations(Tenant tenant) protected voidcreateDefaultAuthorizations(UserEntity userEntity) protected voidcreateDefaultMembershipAuthorizations(String userId, String groupId) protected voidcreateDefaultTenantMembershipAuthorizations(Tenant tenant, Group group) protected voidcreateDefaultTenantMembershipAuthorizations(Tenant tenant, User user) createMembership(String userId, String groupId) Creates a membership relation between a user and a group.createNewGroup(String groupId) Returns a new (transient)Groupobject.createNewTenant(String tenantId) Returns a new (transient)Tenantobject.createNewUser(String userId) Returns a new (transient)Userobject.createTenantGroupMembership(String tenantId, String groupId) Creates a membership relation between a tenant and a group.createTenantUserMembership(String tenantId, String userId) Creates a membership relation between a tenant and a user.deleteGroup(String groupId) Allows deleting a persistentGroupobject.deleteMembership(String userId, String groupId) Deletes a membership relation between a user and a group.protected voiddeleteMembershipsByGroupId(String groupId) protected voiddeleteMembershipsByUserId(String userId) deleteTenant(String tenantId) Allows deleting a persistentTenantobject.deleteTenantGroupMembership(String tenantId, String groupId) Deletes a membership relation between a tenant and a group.protected voiddeleteTenantMembershipsOfGroup(String groupId) protected voidprotected voiddeleteTenantMembershipsOfUser(String userId) deleteTenantUserMembership(String tenantId, String userId) Deletes a membership relation between a tenant and a user.deleteUser(String userId) Allows deleting a persistentUserobject.protected booleanisUserLocked(UserEntity user) protected voidlockUser(UserEntity user) Allows saving aGroupobject which is not yet persistent.saveTenant(Tenant tenant) Allows saving aTenantobject which is not yet persistent.Allows saving or updates aUserobjectunlockUser(String userId) Allows unlocking aUserobject.protected IdentityOperationResultunlockUser(UserEntity user) Methods inherited from class org.camunda.bpm.engine.impl.identity.db.DbReadOnlyIdentityServiceProvider
checkAuthorization, configureQuery, createGroupQuery, createGroupQuery, createNativeUserQuery, createTenantQuery, createTenantQuery, createUserQuery, createUserQuery, existsMembership, existsTenantMembership, findGroupById, findGroupByQueryCriteria, findGroupCountByQueryCriteria, findTenantById, findTenantByQueryCriteria, findTenantCountByQueryCriteria, findUserById, findUserByNativeQuery, findUserByQueryCriteria, findUserCountByNativeQuery, findUserCountByQueryCriteria, matchPasswordMethods inherited from class org.camunda.bpm.engine.impl.persistence.AbstractManager
close, delete, deleteAuthorizations, deleteAuthorizationsForGroup, deleteAuthorizationsForUser, deleteDefaultAuthorizations, flush, getAttachmentManager, getAuthorizationManager, getBatchManager, getByteArrayManager, getCamundaFormDefinitionManager, 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
-
Field Details
-
LOG
-
-
Constructor Details
-
DbIdentityServiceProvider
public DbIdentityServiceProvider()
-
-
Method Details
-
createNewUser
Description copied from interface:WritableIdentityProviderReturns a new (transient)
Userobject. The Object is not yet persistent and must be saved using theWritableIdentityProvider.saveUser(User)method.NOTE: the implementation does not validate the uniqueness of the userId parameter at this time.
- Specified by:
createNewUserin interfaceWritableIdentityProvider- Returns:
- an non-persistent user object.
-
saveUser
Description copied from interface:WritableIdentityProviderAllows saving or updates aUserobject- Specified by:
saveUserin interfaceWritableIdentityProvider- Parameters:
user- a User object.- Returns:
- the operation result object.
-
deleteUser
Description copied from interface:WritableIdentityProviderAllows deleting a persistentUserobject.- Specified by:
deleteUserin interfaceWritableIdentityProvider- Returns:
- the operation result object.
-
checkPassword
- Specified by:
checkPasswordin interfaceReadOnlyIdentityProvider- Overrides:
checkPasswordin classDbReadOnlyIdentityServiceProvider- Returns:
- 'true' if the password matches the
-
isUserLocked
-
lockUser
-
unlockUser
Description copied from interface:WritableIdentityProviderAllows unlocking aUserobject.- Specified by:
unlockUserin interfaceWritableIdentityProvider- Parameters:
userId- the id of the User object to delete.- Returns:
- the operation result object.
-
unlockUser
-
createNewGroup
Description copied from interface:WritableIdentityProviderReturns a new (transient)
Groupobject. The Object is not yet persistent and must be saved using theWritableIdentityProvider.saveGroup(Group)method.NOTE: the implementation does not validate the uniqueness of the groupId parameter at this time.
- Specified by:
createNewGroupin interfaceWritableIdentityProvider- Returns:
- an non-persistent group object.
-
saveGroup
Description copied from interface:WritableIdentityProviderAllows saving aGroupobject which is not yet persistent.- Specified by:
saveGroupin interfaceWritableIdentityProvider- Parameters:
group- a group object.- Returns:
- the operation result object.
-
deleteGroup
Description copied from interface:WritableIdentityProviderAllows deleting a persistentGroupobject.- Specified by:
deleteGroupin interfaceWritableIdentityProvider- Parameters:
groupId- the id of the group object to delete.- Returns:
- the operation result object.
-
createNewTenant
Description copied from interface:WritableIdentityProviderReturns a new (transient)
Tenantobject. The Object is not yet persistent and must be saved using theWritableIdentityProvider.saveTenant(Tenant)method.NOTE: the implementation does not validate the uniqueness of the tenantId parameter at this time.
- Specified by:
createNewTenantin interfaceWritableIdentityProvider- Parameters:
tenantId- the id of the new tenant- Returns:
- an non-persistent tenant object.
-
saveTenant
Description copied from interface:WritableIdentityProviderAllows saving aTenantobject which is not yet persistent.- Specified by:
saveTenantin interfaceWritableIdentityProvider- Parameters:
tenant- the tenant object to save.- Returns:
- the operation result object.
-
deleteTenant
Description copied from interface:WritableIdentityProviderAllows deleting a persistentTenantobject.- Specified by:
deleteTenantin interfaceWritableIdentityProvider- Parameters:
tenantId- the id of the tenant object to delete.- Returns:
- the operation result object.
-
createMembership
Description copied from interface:WritableIdentityProviderCreates a membership relation between a user and a group. If the user is already part of that group, IdentityProviderException is thrown.- Specified by:
createMembershipin interfaceWritableIdentityProvider- Parameters:
userId- the id of the usergroupId- id of the group- Returns:
- the operation result object.
-
deleteMembership
Description copied from interface:WritableIdentityProviderDeletes a membership relation between a user and a group.- Specified by:
deleteMembershipin interfaceWritableIdentityProvider- Parameters:
userId- the id of the usergroupId- id of the group- Returns:
- the operation result object.
-
deleteMembershipsByUserId
-
deleteMembershipsByGroupId
-
createTenantUserMembership
Description copied from interface:WritableIdentityProviderCreates a membership relation between a tenant and a user.- Specified by:
createTenantUserMembershipin interfaceWritableIdentityProvider- Parameters:
tenantId- the id of the tenantuserId- the id of the user- Returns:
- the operation result object.
-
createTenantGroupMembership
Description copied from interface:WritableIdentityProviderCreates a membership relation between a tenant and a group.- Specified by:
createTenantGroupMembershipin interfaceWritableIdentityProvider- Parameters:
tenantId- the id of the tenantgroupId- the id of the group- Returns:
- the operation result object.
-
deleteTenantUserMembership
Description copied from interface:WritableIdentityProviderDeletes a membership relation between a tenant and a user.- Specified by:
deleteTenantUserMembershipin interfaceWritableIdentityProvider- Parameters:
tenantId- the id of the tenantuserId- the id of the user- Returns:
- the operation result object
-
deleteTenantGroupMembership
Description copied from interface:WritableIdentityProviderDeletes a membership relation between a tenant and a group.- Specified by:
deleteTenantGroupMembershipin interfaceWritableIdentityProvider- Parameters:
tenantId- the id of the tenantgroupId- the id of the group- Returns:
- the operation result object.
-
deleteTenantMembershipsOfUser
-
deleteTenantMembershipsOfGroup
-
deleteTenantMembershipsOfTenant
-
createDefaultAuthorizations
-
createDefaultAuthorizations
-
createDefaultAuthorizations
-
createDefaultMembershipAuthorizations
-
createDefaultTenantMembershipAuthorizations
-
createDefaultTenantMembershipAuthorizations
-