Endpoints for user authentication including login, logout, and token refresh operations.
Endpoints for user authentication including login, logout, and token refresh operations.
/auth/login
Authenticate a user and return an access token.
username
string
required
The user's username
password
string
required
The user's password
Successfully logged in
token
string
The access token for authenticated requests
This response does not contain any headers
Invalid credentials
This response is empty
This response does not contain any headers
{ "username": "johndoe", "password": "strongpassword123" }
Successfully logged in
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
/auth/logout
Revoke the current user's access token.
Successfully logged out
This response is empty
This response does not contain any headers
/auth/refresh
Refresh the access token using a refresh token.
token
string
required
The refresh token
Successfully refreshed token
token
string
The new access token
This response does not contain any headers
Invalid token
This response is empty
This response does not contain any headers
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
Successfully refreshed token
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }