Package org.camunda.bpm.engine.impl
Class IdentityServiceImpl
java.lang.Object
org.camunda.bpm.engine.impl.ServiceImpl
org.camunda.bpm.engine.impl.IdentityServiceImpl
- All Implemented Interfaces:
- IdentityService
- Author:
- Tom Baeyens
- 
Field SummaryFields inherited from class org.camunda.bpm.engine.impl.ServiceImplcommandExecutor
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancheckPassword(String userId, String password) Checks if the password is valid for the given user.checkPasswordAgainstPolicy(String password) Check a given password against the configuredPasswordPolicy.checkPasswordAgainstPolicy(String candidatePassword, User user) Check a given password against the configuredPasswordPolicy.checkPasswordAgainstPolicy(PasswordPolicy policy, String password) Check a given password against a givenPasswordPolicy.checkPasswordAgainstPolicy(PasswordPolicy policy, String candidatePassword, User user) Check a given password against a givenPasswordPolicy.voidAllows clearing the current authentication.Creates aGroupQuerythats allows to programmatically query the groups.voidcreateMembership(String userId, String groupId) Creates aNativeUserQuerythat allows to select users with native queries.voidcreateTenantGroupMembership(String tenantId, String groupId) Creates a new membership between the given group and tenant.Creates aTenantQuerythats allows to programmatically query the tenants.voidcreateTenantUserMembership(String tenantId, String userId) Creates a new membership between the given user and tenant.Creates aUserQuerythat allows to programmatically query the users.voiddeleteGroup(String groupId) Deletes the group.voiddeleteMembership(String userId, String groupId) Delete the membership of the user in the group.voiddeleteTenant(String tenantId) Deletes the tenant.voiddeleteTenantGroupMembership(String tenantId, String groupId) Deletes the membership between the given group and tenant.voiddeleteTenantUserMembership(String tenantId, String userId) Deletes the membership between the given user and tenant.voiddeleteUser(String userId) voiddeleteUserAccount(String userId, String accountName) Delete an entry of the generic extensibility key-value pairs associated with a uservoiddeleteUserInfo(String userId, String key) Delete an entry of the generic extensibility key-value pairs associated with a uservoiddeleteUserPicture(String userId) Deletes the picture for a given user.Returns thePasswordPolicythat is currently configured in the engine.getUserAccount(String userId, String userPassword, String accountName) Get account information associated with a usergetUserAccountNames(String userId) Get account names associated with the given usergetUserInfo(String userId, String key) Generic extensibility key-value pairs associated with a usergetUserInfoKeys(String userId) Generic extensibility keys associated with a usergetUserPicture(String userId) Retrieves the picture for a given user.booleanAllows to inquire whether this identity service implementation provides read-only access to the user repository, false otherwise.Creates a new group.Creates a new tenant.Creates a new user.voidSaves the group.voidsaveTenant(Tenant tenant) Saves the tenant.voidSaves the user.voidvoidsetAuthenticatedUserId(String authenticatedUserId) Passes the authenticated user id for this thread.voidsetAuthentication(String userId, List<String> groups) Passes the authenticated user id and groupIds for this thread.voidPasses the authenticated user id, group ids and tenant ids for this thread.voidvoidsetUserAccount(String userId, String userPassword, String accountName, String accountUsername, String accountPassword, Map<String, String> accountDetails) Store account information for a remote systemvoidsetUserInfo(String userId, String key, String value) Generic extensibility key-value pairs associated with a uservoidsetUserPicture(String userId, Picture picture) Sets the picture for a given user.voidunlockUser(String userId) Methods inherited from class org.camunda.bpm.engine.impl.ServiceImplgetCommandExecutor, setCommandExecutor
- 
Constructor Details- 
IdentityServiceImplpublic IdentityServiceImpl()
 
- 
- 
Method Details- 
isReadOnlypublic boolean isReadOnly()Description copied from interface:IdentityServiceAllows to inquire whether this identity service implementation provides read-only access to the user repository, false otherwise. Read only identity service implementations do not support the following methods:-  IdentityService.newUser(String)
-  IdentityService.saveUser(User)
-  IdentityService.deleteUser(String)
-  IdentityService.newGroup(String)
-  IdentityService.saveGroup(Group)
-  IdentityService.deleteGroup(String)
-  IdentityService.newTenant(String)
-  IdentityService.saveTenant(Tenant)
-  IdentityService.deleteTenant(String)
-  IdentityService.createMembership(String, String)
-  IdentityService.deleteMembership(String, String)
-  IdentityService.createTenantUserMembership(String, String)
-  IdentityService.createTenantGroupMembership(String, String)
-  IdentityService.deleteTenantUserMembership(String, String)
-  IdentityService.deleteTenantGroupMembership(String, String)
 If these methods are invoked on a read-only identity service implementation, the invocation will throw an UnsupportedOperationException.- Specified by:
- isReadOnlyin interface- IdentityService
- Returns:
- true if this identity service implementation provides read-only access to the user repository, false otherwise.
 
-  
- 
newGroupDescription copied from interface:IdentityServiceCreates a new group. The group is transient and must be saved usingIdentityService.saveGroup(Group).- Specified by:
- newGroupin interface- IdentityService
- Parameters:
- groupId- id for the new group, cannot be null.
 
- 
newUserDescription copied from interface:IdentityServiceCreates a new user. The user is transient and must be saved usingIdentityService.saveUser(User).- Specified by:
- newUserin interface- IdentityService
- Parameters:
- userId- id for the new user, cannot be null.
 
- 
newTenantDescription copied from interface:IdentityServiceCreates a new tenant. The tenant is transient and must be saved usingIdentityService.saveTenant(Tenant).- Specified by:
- newTenantin interface- IdentityService
- Parameters:
- tenantId- id for the new tenant, cannot be- null.
 
- 
saveGroupDescription copied from interface:IdentityServiceSaves the group. If the group already existed, the group is updated.- Specified by:
- saveGroupin interface- IdentityService
- Parameters:
- group- group to save. Cannot be null.
 
- 
saveUserDescription copied from interface:IdentityServiceSaves the user. If the user already existed, the user is updated.- Specified by:
- saveUserin interface- IdentityService
- Parameters:
- user- user to save, cannot be null.
 
- 
saveUser
- 
saveTenantDescription copied from interface:IdentityServiceSaves the tenant. If the tenant already existed, it is updated.- Specified by:
- saveTenantin interface- IdentityService
- Parameters:
- tenant- the tenant to save. Cannot be- null.
 
- 
createUserQueryDescription copied from interface:IdentityServiceCreates aUserQuerythat allows to programmatically query the users.- Specified by:
- createUserQueryin interface- IdentityService
 
- 
createNativeUserQueryDescription copied from interface:IdentityServiceCreates aNativeUserQuerythat allows to select users with native queries.- Specified by:
- createNativeUserQueryin interface- IdentityService
- Returns:
- NativeUserQuery
 
- 
createGroupQueryDescription copied from interface:IdentityServiceCreates aGroupQuerythats allows to programmatically query the groups.- Specified by:
- createGroupQueryin interface- IdentityService
 
- 
createTenantQueryDescription copied from interface:IdentityServiceCreates aTenantQuerythats allows to programmatically query the tenants.- Specified by:
- createTenantQueryin interface- IdentityService
 
- 
createMembership- Specified by:
- createMembershipin interface- IdentityService
- Parameters:
- userId- the userId, cannot be null.
- groupId- the groupId, cannot be null.
 
- 
deleteGroupDescription copied from interface:IdentityServiceDeletes the group. When no group exists with the given id, this operation is ignored.- Specified by:
- deleteGroupin interface- IdentityService
- Parameters:
- groupId- id of the group that should be deleted, cannot be null.
 
- 
deleteMembershipDescription copied from interface:IdentityServiceDelete the membership of the user in the group. When the group or user don't exist or when the user is not a member of the group, this operation is ignored.- Specified by:
- deleteMembershipin interface- IdentityService
- Parameters:
- userId- the user's id, cannot be null.
- groupId- the group's id, cannot be null.
 
- 
checkPasswordDescription copied from interface:IdentityServiceChecks if the password is valid for the given user. Arguments userId and password are nullsafe.- Specified by:
- checkPasswordin interface- IdentityService
 
- 
checkPasswordAgainstPolicyDescription copied from interface:IdentityServiceCheck a given password against the configuredPasswordPolicy. The result is returned asPasswordPolicyResultwhich contains all passed and violated rules as well as a flag indicating if the password is valid.- Specified by:
- checkPasswordAgainstPolicyin interface- IdentityService
- Parameters:
- candidatePassword- which is checked against a password policy
- user- to be taken into account when checking the candidate password
- Returns:
- a PasswordPolicyResultcontaining passed and failed rules
 
- 
checkPasswordAgainstPolicyDescription copied from interface:IdentityServiceCheck a given password against the configuredPasswordPolicy. The result is returned asPasswordPolicyResultwhich contains all passed and violated rules as well as a flag indicating if the password is valid.- Specified by:
- checkPasswordAgainstPolicyin interface- IdentityService
- Parameters:
- password- the password that should be tested
- Returns:
- a PasswordPolicyResultcontaining passed and failed rules
 
- 
checkPasswordAgainstPolicypublic PasswordPolicyResult checkPasswordAgainstPolicy(PasswordPolicy policy, String candidatePassword, User user) Description copied from interface:IdentityServiceCheck a given password against a givenPasswordPolicy. The result is returned asPasswordPolicyResultwhich contains all passed and violated rules as well as a flag indicating if the password is valid.- Specified by:
- checkPasswordAgainstPolicyin interface- IdentityService
- Parameters:
- policy- the- PasswordPolicyagainst which the password is tested
- candidatePassword- which is checked against a password policy
- user- to be taken into account when checking the candidate password
- Returns:
- a PasswordPolicyResultcontaining passed and failed rules
 
- 
checkPasswordAgainstPolicyDescription copied from interface:IdentityServiceCheck a given password against a givenPasswordPolicy. The result is returned asPasswordPolicyResultwhich contains all passed and violated rules as well as a flag indicating if the password is valid.- Specified by:
- checkPasswordAgainstPolicyin interface- IdentityService
- Parameters:
- policy- the- PasswordPolicyagainst which the password is tested
- password- the password that should be tested
- Returns:
- a PasswordPolicyResultcontaining passed and failed rules
 
- 
getPasswordPolicyDescription copied from interface:IdentityServiceReturns thePasswordPolicythat is currently configured in the engine.- Specified by:
- getPasswordPolicyin interface- IdentityService
- Returns:
- the current PasswordPolicyornullif no policy is set or the configured policy is disabled.
 
- 
unlockUser- Specified by:
- unlockUserin interface- IdentityService
 
- 
deleteUser- Specified by:
- deleteUserin interface- IdentityService
- Parameters:
- userId- id of user to delete, cannot be null. When an id is passed for an unexisting user, this operation is ignored.
 
- 
deleteTenantDescription copied from interface:IdentityServiceDeletes the tenant. When no tenant exists with the given id, this operation is ignored.- Specified by:
- deleteTenantin interface- IdentityService
- Parameters:
- tenantId- id of the tenant that should be deleted, cannot be- null.
 
- 
setUserPictureDescription copied from interface:IdentityServiceSets the picture for a given user.- Specified by:
- setUserPicturein interface- IdentityService
- picture- can be null to delete the picture.
 
- 
getUserPictureDescription copied from interface:IdentityServiceRetrieves the picture for a given user.- Specified by:
- getUserPicturein interface- IdentityService
 
- 
deleteUserPictureDescription copied from interface:IdentityServiceDeletes the picture for a given user. If the user does not have a picture or if the user doesn't exists the call is ignored.- Specified by:
- deleteUserPicturein interface- IdentityService
 
- 
setAuthenticatedUserIdDescription copied from interface:IdentityServicePasses the authenticated user id for this thread. All service method (from any service) invocations done by the same thread will have access to this authenticatedUserId. Should be followed by a call toIdentityService.clearAuthentication()once the interaction is terminated.- Specified by:
- setAuthenticatedUserIdin interface- IdentityService
- Parameters:
- authenticatedUserId- the id of the current user.
 
- 
setAuthentication- Specified by:
- setAuthenticationin interface- IdentityService
 
- 
setAuthenticationDescription copied from interface:IdentityServicePasses the authenticated user id and groupIds for this thread. All service method (from any service) invocations done by the same thread will have access to this authentication. Should be followed by a call toIdentityService.clearAuthentication()once the interaction is terminated.- Specified by:
- setAuthenticationin interface- IdentityService
- groups- the groups of the current user.
 
- 
setAuthenticationDescription copied from interface:IdentityServicePasses the authenticated user id, group ids and tenant ids for this thread. All service method (from any service) invocations done by the same thread will have access to this authentication. Should be followed by a call toIdentityService.clearAuthentication()once the interaction is terminated.- Specified by:
- setAuthenticationin interface- IdentityService
- Parameters:
- userId- the id of the current user.
- groups- the groups of the current user.
- tenantIds- the tenants of the current user.
 
- 
clearAuthenticationpublic void clearAuthentication()Description copied from interface:IdentityServiceAllows clearing the current authentication. Does not throw exception if no authentication exists.- Specified by:
- clearAuthenticationin interface- IdentityService
 
- 
getCurrentAuthentication- Specified by:
- getCurrentAuthenticationin interface- IdentityService
- Returns:
- the current authentication for this process engine.
 
- 
getUserInfoDescription copied from interface:IdentityServiceGeneric extensibility key-value pairs associated with a user- Specified by:
- getUserInfoin interface- IdentityService
 
- 
getUserInfoKeysDescription copied from interface:IdentityServiceGeneric extensibility keys associated with a user- Specified by:
- getUserInfoKeysin interface- IdentityService
 
- 
getUserAccountNamesDescription copied from interface:IdentityServiceGet account names associated with the given user- Specified by:
- getUserAccountNamesin interface- IdentityService
 
- 
setUserInfoDescription copied from interface:IdentityServiceGeneric extensibility key-value pairs associated with a user- Specified by:
- setUserInfoin interface- IdentityService
 
- 
deleteUserInfoDescription copied from interface:IdentityServiceDelete an entry of the generic extensibility key-value pairs associated with a user- Specified by:
- deleteUserInfoin interface- IdentityService
 
- 
deleteUserAccountDescription copied from interface:IdentityServiceDelete an entry of the generic extensibility key-value pairs associated with a user- Specified by:
- deleteUserAccountin interface- IdentityService
 
- 
getUserAccountDescription copied from interface:IdentityServiceGet account information associated with a user- Specified by:
- getUserAccountin interface- IdentityService
 
- 
setUserAccountpublic void setUserAccount(String userId, String userPassword, String accountName, String accountUsername, String accountPassword, Map<String, String> accountDetails) Description copied from interface:IdentityServiceStore account information for a remote system- Specified by:
- setUserAccountin interface- IdentityService
 
- 
createTenantUserMembershipDescription copied from interface:IdentityServiceCreates a new membership between the given user and tenant.- Specified by:
- createTenantUserMembershipin interface- IdentityService
- Parameters:
- tenantId- the id of the tenant, cannot be null.
- userId- the id of the user, cannot be null.
 
- 
createTenantGroupMembershipDescription copied from interface:IdentityServiceCreates a new membership between the given group and tenant.- Specified by:
- createTenantGroupMembershipin interface- IdentityService
- Parameters:
- tenantId- the id of the tenant, cannot be null.
- groupId- the id of the group, cannot be null.
 
- 
deleteTenantUserMembershipDescription copied from interface:IdentityServiceDeletes the membership between the given user and tenant. The operation is ignored when the given user, tenant or membership don't exist.- Specified by:
- deleteTenantUserMembershipin interface- IdentityService
- Parameters:
- tenantId- the id of the tenant, cannot be null.
- userId- the id of the user, cannot be null.
 
- 
deleteTenantGroupMembershipDescription copied from interface:IdentityServiceDeletes the membership between the given group and tenant. The operation is ignored when the given group, tenant or membership don't exist.- Specified by:
- deleteTenantGroupMembershipin interface- IdentityService
- Parameters:
- tenantId- the id of the tenant, cannot be null.
- groupId- the id of the group, cannot be null.
 
 
-