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
Email User Profile Item Combining User Persister Email Notification Task Email Notification Task Destroy Last User Session Lock Expired Initial Passwords Task Lock Expired Initial Passwords Task Custom User Persister-based User Store Provider Delete Users Task Delete Users Task User Persister-based User Store Meta Authenticator Email Notifier Self Reg Users Clean Up Task Self Reg Users Clean Up Task User to Password Service Mapping Extended User Persister-based User Store Provider New Email Clean-up Strategy Vasco Letter Generator User Persister Email Certificate Provider Password Batch Task Password Batch Task HTTP Password Service Self Reg Users Reminder Task Self Reg Users Reminder Task Certificate Authenticator Combining Extended User Persister Combining Extended User Persister User Persister Configuration User Persister Configuration User Persister Configuration Cipher User Persister String User Profile Item Lock Inactive Accounts Task Lock Inactive Accounts Task Token Activation On Delivery Strategy Password Authenticator Selection Authenticator Main Authenticator Auth Method-based Authenticator Selector Extended String User Profile Item Certificate Token Authenticator Integer User Profile Item Radius Authentication Service Lookup and Accept Authenticator SMS Notifier Role-based Authenticator Selector Export Users Task Export Users Task Airlock 2FA Authenticator Credential Data Certificate Matcher
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]