User Login
Authenticate user credentials and return access token.
Security Features:
- Rate limiting (5 attempts per IP, then after increasing delay 60s, 180s, 10min, 30min, 1h, 3h)
- Password validation
- Account lockout after failed attempts
- application/json
Request Body required
- username string required
Possible values: [
admin,manager]The user name for login
- password string required
MD5 hash of the complex password for login (e. g. MySecure123!=300a31fbdc6f3ff4fb27625c2ed49fdc)
Responses
- 200
- 400
- 429
Login successful
- application/json
- Schema
- Example (from schema)
- Example
Schema
- token string
Login token
- account_type string
Possible values: [
manager,admin]Login account type
{
"token": "93144b288eb1fd3cbe46d6fc0f241a51766ecd3d",
"account_type": "admin"
}
{
"account_type": "admin",
"token": "93144b288eb1fdc1be46d6fc0f241a51766ecd3d"
}
Validation error or required fields are not provided
- application/json
- Schema
- Example (from schema)
- Missed
- Wrong
- Manager Disabled
Schema
- error string
Error message
{
"error": "Wrong login or password"
}
{
"error": "Required parameters missed"
}
{
"error": "Wrong login or password"
}
{
"error": "Manager account is disabled"
}
Too Many Requests - Rate limit exceeded
- application/json
- Schema
- Example (from schema)
- Too Many Requests
Schema
- error string
Error message
- seconds integer
Remaining delay before next retry
{
"error": "Too Many Requests",
"seconds": 60
}
{
"error": "Too Many Requests",
"seconds": 60
}
Loading...