JanssenProject / JanssenProject/jans
docs(jans-cli-tui): clarify userId and username behavior
- Dominant language
- Java
- Stars
- 648
- Forks
- 174
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 110
Description
**Clarify `userId` and `username` behavior in Jans CLI and TUI**
There is an inconsistency in how the username is handled when creating a user through Jans TUI and Jans CLI.
**Observed behavior**
**Jans TUI**
When creating a user through Jans TUI, the **Username** field is required.
**Jans CLI**
Using the `post-user` operation, a user can be created without providing `userId`:
```bash
jans cli --operation-id post-user \
--data '{
"givenName": "Test",
"displayName": "Test User",
"mail": "user@example.com",
"userPassword": "your-password",
"status": "active"
}'
```
A user can also be created by providing `userId`. When `userId` is provided, its value is displayed as the user's username.
**Clarification needed**
Please clarify the following:
1. Is `userId` the same attribute as the **Username** shown in Jans TUI, or are they different attributes?
2. Is `Username/userId` required for user creation in Jans TUI, while it is optional when creating a user through Jans CLI?
**Documentation impact**
Clarifying this behavior will allow the Jans CLI and TUI documentation to accurately describe the user creation requirements and avoid confusion around `userId` and `userName`.
Contributor guide
Assessment
This issue has not been assessed yet.