Dummy Extended User Persister
Description
Dummy user persister and iterator that can be used for testing. Its behavior is purely determined by the input in the following way:
Getting a User (getPersistentUserByName):
- If the username contains the string "notfound" a NotFoundException is thrown.
- If the username contains the string "ambig" a NotUniqueException is thrown.
- If the username contains the string "except" a PersisterException is thrown.
- If the username contains the string "nobody" a user with no roles is returned.
- If the username contains the string "locked" a locked user is returned. Locked date and reason are set.
- If the username contains the string "pwch" the password change enforced flag is set for the returned user.
- If the username contains the string "pworder" the password order flag is set for the returned user.
- If the username contains the string "manyfailed" the user is not locked but has 10 failed logins.
- For all other user names, a user bean with the specified username and fixed other data is returned. The roles of the user are configurable.
Updating a User (makeUserPersistent):
- If the username contains the string "notfound" a NotFoundException is thrown.
- If the username contains the string "ambig" a NotUniqueException is thrown.
- If the username contains the string "except" a PersisterException is thrown.
- For all other usernames, the call returns normally.
Inserting a User (insertUser):
- If the username of the inserted user contains the string "ambig" a NotUniqueException is thrown.
- If the username of the inserted user contains the string "except" a PersisterException is thrown.
- For all other usernames, the call returns normally.
Deleting a User (deleteUser):
- If the username contains the string "notfound" a NotFoundException is thrown.
- If the username contains the string "ambig" a NotUniqueException is thrown.
- If the username contains the string "except" a PersisterException is thrown.
- For all other usernames, the call returns normally.
Getting all User-IDs (getAllUserIds):
- Returns a list with 100 random user ids.
Getting matching User-IDs (getMatchingUserIds):
- If the value to match contains the string "empty" an empty list is returned.
- If the value to match contains the string "big" a list with 10'000 random user ids is returned.
- If the value to match contains the string "except" a PersisterException is thrown.
- For all values to match, a list with 100 random user ids is returned.
The method changeUsername(String oldUsername, String newUsername) is not implemented and will throw a NotImplementedException.
May be used by
Combining Extended User Persister Combining Extended User Persister Export Users Task Export Users Task Selection Authenticator Email User Profile Item Email Notification Task Email Notification Task Email Notifier User Persister Configuration User Persister Configuration User Persister Configuration Self Reg Users Clean Up Task Self Reg Users Clean Up Task Destroy Last User Session Delete Users Task Delete Users Task Lock Inactive Accounts Task Lock Inactive Accounts Task Extended User Persister-based User Store Provider Vasco Letter Generator Combining User Persister Token Activation On Delivery Strategy New Email Clean-up Strategy Extended String User Profile Item Certificate Token Authenticator Cipher User Persister String User Profile Item Custom User Persister-based User Store Provider Password Batch Task Password Batch Task User Persister-based User Store Lookup and Accept Authenticator Integer User Profile Item Credential Data Certificate Matcher Meta Authenticator Auth Method-based Authenticator Selector Role-based Authenticator Selector User to Password Service Mapping Airlock 2FA Authenticator SMS Notifier Lock Expired Initial Passwords Task Lock Expired Initial Passwords Task Self Reg Users Reminder Task Self Reg Users Reminder Task Password Authenticator Radius Authentication Service User Persister Email Certificate Provider Main Authenticator Certificate Authenticator HTTP Password Service
Properties
User Roles (
userRoles) Description
Defines the set of roles assigned to the users returned by this persister.
The roles must be specified as comma-separated list.
The roles must be specified as comma-separated list.
Attributes
String-List
Optional
Default value
[role1, role2]
YAML Template (with default values)
type: DummyExtendedUserPersister
id: DummyExtendedUserPersister-xxxxxx
displayName:
comment:
properties:
userRoles: [role1, role2]