Authenticate store
POST/stores/auth
Authenticate a store and return a token.
Request
- application/json
Body
required
username stringrequired
Possible values: >= 5 characters and <= 50 characters
password stringrequired
Possible values: >= 6 characters and <= 16 characters
Responses
- 200
- 400
- 403
- 500
Store authenticated
Response Headers
x-auth-token string
JWT token
- application/json
- Schema
- Example (from schema)
Schema
_id uuid
name string
username string
bufferLocations uuid[]
callingStations uuid[]
properties object
createdAt date-time
updatedAt date-time
token string
JWT token
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"username": "string",
"bufferLocations": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"callingStations": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"properties": {},
"createdAt": "2024-12-03T13:25:45.041Z",
"updatedAt": "2024-12-03T13:25:45.041Z",
"token": "string"
}
Bad Request due to validation errors in the request body
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Validation failed.",
"errors": [
{
"field": "email",
"message": "Email must be a valid email address."
},
{
"field": "password",
"message": "Password must be 6 characters or longer."
}
]
}
{
"message": "Validation failed.",
"errors": [
{
"field": "email",
"message": "Email must be a valid email address."
},
{
"field": "password",
"message": "Password must be 6 characters or longer."
}
]
}
Forbidden.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Access to this resource is forbidden."
}
{
"message": "Access to this resource is forbidden."
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Internal Server Error. Please try again later."
}
{
"message": "Internal Server Error. Please try again later."
}
Loading...