Target: Class annotated with @ApplicationDefinition.
Description: Creates a default user with a set of specific attributes. This annotation declares the desired User creating it and setting all specific attributes on the currently active IdentityManager.
JavaDoc: Click here
Remarks: All users must have user name defined. All other attributes have default values.
Attributes are coma separated key/value pairs. i.e. attributes="attr1=value1, attr2=value2...".
If the specified users or groups do not exist they will be created on whatever IdentityManager is in place.
The users will be associated to the given profile, which, if also does not exist, will be created.
Attributes:
Name | Description | Data type | Required | Default value |
userName | The user name for the given user (for login purposes). | String | Yes | - |
password | Default password for the given user. | String | No | Defaults to the "userName" |
fullName | Full name for the given user. | String | No | Defaults to the "userName" |
nick | Nick name for the given user. | String | No | Defaults to "$userName@domain.com" |
Default email for this user. | String | No | Defaults to the "userName" | |
profile | Default email for this user. | String | No | DIF's default group, default "users" |
groups | List of groups that this user is associated to. | String | No | - |
attributes | List of user attributes. Key value pairs. | String | No | - |
Example:
@ApplicationDefinition(name = "Some Application", provider = "mockupProvider") @User(userName="user1", password="password1", profile="sampleUsers", groups="group1,group2", attributes="id=1,someAttr=yav") public class SomeApplication { ... }
See also: