Login
Authenticates a user and returns a JSON Web Token (JWT).
Endpoint for Login:
-
URL:
POST http://<your-domain>/api/auth/login -
Headers:
- Key:
Content-Type - Value:
application/json
- Key:
-
Body:
{
"username": "random_username",
"credential": "password_here"
}
Sucessfull Rensponse Example:
{
"token": "eyJhbGciOiJIUzM4NCJ9..."
}
Response Status
200 OK– Returns JWT token403 Forbidden– Invalid username or password