CLI User Management
QvaSoft Gateway includes a command-line interface for managing users without starting the web server.
Usage
ApiGateway <command>
Or with dotnet run:
dotnet run -- <command>
Commands
Add User
Create a new user interactively:
ApiGateway add
Username: john@example.com
Password: ********
User created
The password is hidden with asterisks as you type. The user is assigned the Administrator role by default.
Remove User
Delete an existing user:
ApiGateway remove
Username: john@example.com
User removed
Change Password
Reset a user's password (also unlocks locked accounts):
ApiGateway set-password
Username: admin@example.com
New password: ********
Password updated
List Users
Display all registered users:
ApiGateway list
- admin@example.com
- john@example.com
Password Policy
All passwords must meet these requirements:
| Requirement | Value |
|---|---|
| Minimum length | 8 characters |
| Uppercase letter | Required |
| Lowercase letter | Required |
| Digit | Required |
| Special character | Not required |
Account Lockout
| Setting | Value |
|---|---|
| Max failed attempts | 3 |
| Lockout duration | 15 minutes |
| New users lockable | Yes |
Use set-password to unlock a locked account.
Database
Users are stored in a SQLite database at identity.db (configurable in appsettings.json):
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=identity.db"
}
}