Chuyển tới nội dung chính

Usage Examples

Register User (cURL)​

curl -X POST <http://localhost:8080/api/auth/register>
-H "Content-Type: application/json"
-d '{"email": "<user@example.com>", "name": "John Doe", "password": "StrongPass123!", "gender": "MALE"}'

Login (cURL)​

curl -X POST <http://localhost:8080/api/auth/login>
-H "Content-Type: application/json"
-d '{"email": "<user@example.com>", "password": "StrongPass123!"}'
--cookie-jar cookies.txt

Refresh Token​

Use the cookie from login:

curl -X POST <http://localhost:8080/api/auth/refresh-token>
--cookie cookies.txt --cookie-jar cookies.txt