- Remove 'auth: inherit' from POST request configuration - Remove post-response script that set token environment variable - Clean up documentation formatting This simplifies the login request configuration as authentication will now be handled via HTTP-only cookies instead of bearer tokens.
51 lines
853 B
Plaintext
51 lines
853 B
Plaintext
meta {
|
|
name: Login User
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
post {
|
|
url: {{base_url}}/api/auth/login
|
|
body: json
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"login": "testuser@example.com",
|
|
"password": "Test@Pass123!"
|
|
}
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|
|
|
|
docs {
|
|
## Login User
|
|
|
|
Authenticates a user with email/username and password.
|
|
|
|
**Method:** POST
|
|
|
|
**Endpoint:** /api/auth/login
|
|
|
|
**Request Body:**
|
|
- `login` (string): Email or username
|
|
- `password` (string): Password
|
|
|
|
**Response:**
|
|
- `token` (string): JWT token
|
|
- `user` (object): User details
|
|
- `id` (string): User ID
|
|
- `email` (string): Email
|
|
- `username` (string): Username
|
|
- `theme` (string): User theme preference
|
|
- `first_name` (string): First name
|
|
- `last_name` (string): Last name
|
|
|
|
**Status Codes:**
|
|
- 200: Success
|
|
- 401: Invalid credentials
|
|
}
|