-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrest.http
38 lines (30 loc) · 1.43 KB
/
rest.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
### Cabinet route
GET http://localhost:3000/cabinet
Cookie: Access-Token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2MTc2NTk0MzcsImV4cCI6MTYxNzY2MDAzNywiYXVkIjoiNjA2YTI2NmMwNDc2ODg1OTM1MDc2NTc2IiwiaXNzIjoiZGlhcnkucnUifQ.tBPaZNwo7Px0e3WiVp1-jGvGM-BOFfftjQcJB3c169c; Refresh-Token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2MTc2NTk0MzcsImV4cCI6MTYxNzY2MzAzNywiYXVkIjoiNjA2YTI2NmMwNDc2ODg1OTM1MDc2NTc2IiwiaXNzIjoiZGlhcnkucnUifQ.O8jVQnytR3QWty1z_bzaLlfAcaI2V0OwuVbyOyssJE8
### Register route
POST http://localhost:3000/api/auth/register
Content-Type: application/json
{
"email": "[email protected]",
"password": "test12345678",
"passwordConfirm": "test12345678"
}
### Login route
POST http://localhost:3000/api/auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "test12345678"
}
### Refresh token route
POST http://localhost:3000/api/auth/refresh-token
Content-Type: application/json
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2MTc1Njk2MzksImV4cCI6MTYxNzU2OTY2OSwiYXVkIjoiNjA2YTI2NmMwNDc2ODg1OTM1MDc2NTc2IiwiaXNzIjoiZGlhcnkucnUifQ.e7HWvHsHOxoLxI1v9R-5hOx2a4uHG-V4NEYNVWo3e2g"
}
### Logout
POST http://localhost:3000/api/auth/logout
Content-Type: application/json
{
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2MTc1NzAwNTMsImV4cCI6MTYxNzU3MDExMywiYXVkIjoiNjA2YTI2NmMwNDc2ODg1OTM1MDc2NTc2IiwiaXNzIjoiZGlhcnkucnUifQ.s0g8oe-p_t8rVZXm51N0c6mCKWrdlBXBT-Lx8GlhkWI"
}