Login user and receive JWT token.
POST/api/auth/login
This endpoint allows users to login to sero server. The TTL for token is set by
the owner of the server by JWT_TTL
env.
Request
- application/json
Body
required
- Minimum length of 5 characters.
- Maximum length of 40 characters.
- Minimum length of 12 characters.
- Maximum length of 40 characters.
login stringrequired
Possible values: >= 5 characters
and <= 40 characters
The username used for authentication. It must adhere to the following criteria:
password stringrequired
Possible values: >= 12 characters
and <= 40 characters
The password used for authentication. It must meet the following requirements:
Responses
- 200
- 400
- 404
- 500
User was successfully authenticated.
- application/json
- Schema
- Example (from schema)
Schema
token stringrequired
Token in JWT format
{
"token": "ferwfwerfwer.fwerfwerfwerfwer.fwerfewfr"
}
Bad request or bad credentials. See details.
- application/json
- Schema
- Example (from schema)
Schema
reason stringrequired
This field will contain error information
{
"reason": "string"
}
Login was not found.
- application/json
- Schema
- Example (from schema)
Schema
reason stringrequired
This field will contain error information
{
"reason": "string"
}
Some error occurred on the server.
- application/json
- Schema
- Example (from schema)
Schema
reason stringrequired
This field will contain error information
{
"reason": "string"
}
Loading...