Correct the sequence numbers for logout and refresh token tests. Add sample registration data to the Register User test.
41 lines
902 B
YAML
41 lines
902 B
YAML
info:
|
|
name: Logout User
|
|
type: http
|
|
seq: 3
|
|
http:
|
|
method: POST
|
|
url: '{{base_url}}/api/auth/logout'
|
|
auth: inherit
|
|
body:
|
|
type: json
|
|
jsonBody: "{\n \"refresh_token\": \"{{refresh_token"
|
|
headers:
|
|
- key: Content-Type
|
|
value: application/json
|
|
|
|
docs: |-
|
|
## Logout User
|
|
|
|
Logs out the user by revoking their refresh token. If no refresh token is provided, the request succeeds but no token is revoked.
|
|
|
|
**Method:** POST
|
|
|
|
**Endpoint:** /api/auth/logout
|
|
|
|
**Authentication:** Bearer token (optional)
|
|
|
|
**Request Body:**
|
|
- `refresh_token` (string, optional): Refresh token to revoke
|
|
|
|
**Response:**
|
|
- `message` (string): Success message
|
|
|
|
**Status Codes:**
|
|
- 200: Success - user logged out (token revoked if provided)
|
|
- 401: Unauthorized
|
|
|
|
**Example Response:**
|
|
```json
|
|
{
|
|
"message": "logged out successfully"
|