Admin login
POST/auth/admin/login/
Authenticates an administrative user by validating the provided username and password. Upon successful authentication, a pair of JSON Web Tokens (JWT) — access and refresh — are issued, along with basic user details. These tokens are required for accessing protected endpoints within the system.
Request
- application/json
Body
username stringrequired
The email address of the user.
password passwordrequired
The user's password.
Responses
- 200
- 400
- 401
Returns access and refresh tokens along with user profile data.
- application/json
- Schema
- Example (from schema)
Schema
refresh string
JWT refresh token
access string
JWT access token
user object
id integer
username string
email stringnullable
userType string
Possible values: [ADMIN
, USER
]
address stringnullable
birthDate datenullable
familyName stringnullable
givenName stringnullable
isOver18 boolean
isOver21 boolean
isOver65 boolean
phoneNumber stringnullable
{
"refresh": "string",
"access": "string",
"user": {
"id": 3,
"username": "[email protected]",
"email": "string",
"userType": "ADMIN",
"address": "string",
"birthDate": "2025-04-07",
"familyName": "string",
"givenName": "string",
"isOver18": false,
"isOver21": false,
"isOver65": false,
"phoneNumber": "string"
}
}
Incorrect credentials provided.
Malformed or incomplete request.
Loading...