Skip to content

Commit c1e775c

Browse files
committed
Adding the exported postman collection
1 parent fe0d084 commit c1e775c

File tree

1 file changed

+266
-0
lines changed

1 file changed

+266
-0
lines changed
Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
{
2+
"info": {
3+
"_postman_id": "cf2c8f39-ae3c-4683-b7d0-378568d65938",
4+
"name": "User Authentication",
5+
"description": "fastapi-user-authentication endpoint",
6+
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
7+
"_exporter_id": "36945629"
8+
},
9+
"item": [
10+
{
11+
"name": "Register Account",
12+
"request": {
13+
"method": "POST",
14+
"header": [
15+
{
16+
"key": "device-id",
17+
"value": "some-unique-device-id",
18+
"type": "text"
19+
}
20+
],
21+
"body": {
22+
"mode": "raw",
23+
"raw": "{\r\n \"user_name\": \"User Name\",\r\n \"email\": \"[email protected]\",\r\n \"password\": \"password\"\r\n}\r\n",
24+
"options": {
25+
"raw": {
26+
"language": "json"
27+
}
28+
}
29+
},
30+
"url": "{{URL}}users"
31+
},
32+
"response": []
33+
},
34+
{
35+
"name": "Get All User",
36+
"request": {
37+
"auth": {
38+
"type": "bearer",
39+
"bearer": {
40+
"token": "{{JWT}}"
41+
}
42+
},
43+
"method": "GET",
44+
"header": [],
45+
"url": "{{URL}}users/all"
46+
},
47+
"response": []
48+
},
49+
{
50+
"name": "Get User By ID",
51+
"request": {
52+
"auth": {
53+
"type": "bearer",
54+
"bearer": {
55+
"token": "{{JWT}}"
56+
}
57+
},
58+
"method": "GET",
59+
"header": [],
60+
"url": "{{URL}}users/1"
61+
},
62+
"response": []
63+
},
64+
{
65+
"name": "Log In",
66+
"event": [
67+
{
68+
"listen": "test",
69+
"script": {
70+
"exec": [
71+
"pm.environment.set(\"JWT\", pm.response.json().access_token);"
72+
],
73+
"type": "text/javascript",
74+
"packages": {}
75+
}
76+
}
77+
],
78+
"request": {
79+
"auth": {
80+
"type": "noauth"
81+
},
82+
"method": "POST",
83+
"header": [
84+
{
85+
"key": "device-id",
86+
"value": "some-unique-device-id",
87+
"type": "text"
88+
}
89+
],
90+
"body": {
91+
"mode": "formdata",
92+
"formdata": [
93+
{
94+
"key": "username",
95+
"value": "[email protected]",
96+
"type": "text"
97+
},
98+
{
99+
"key": "password",
100+
"value": "password",
101+
"type": "text"
102+
}
103+
]
104+
},
105+
"url": "{{URL}}auth/login"
106+
},
107+
"response": []
108+
},
109+
{
110+
"name": "Verify User Account",
111+
"request": {
112+
"method": "POST",
113+
"header": [
114+
{
115+
"key": "device-id",
116+
"value": "some-unique-device-id",
117+
"type": "text"
118+
}
119+
],
120+
"body": {
121+
"mode": "raw",
122+
"raw": "{\r\n \"verification_code\": \"000000\",\r\n \"email\": \"[email protected]\"\r\n}",
123+
"options": {
124+
"raw": {
125+
"language": "json"
126+
}
127+
}
128+
},
129+
"url": "{{URL}}users/verify-account"
130+
},
131+
"response": []
132+
},
133+
{
134+
"name": "Refresh Token",
135+
"event": [
136+
{
137+
"listen": "test",
138+
"script": {
139+
"exec": [
140+
"pm.environment.set(\"JWT\", pm.response.json().access_token);"
141+
],
142+
"type": "text/javascript",
143+
"packages": {}
144+
}
145+
}
146+
],
147+
"request": {
148+
"auth": {
149+
"type": "noauth"
150+
},
151+
"method": "POST",
152+
"header": [
153+
{
154+
"key": "refresh-token",
155+
"value": "",
156+
"type": "text"
157+
},
158+
{
159+
"key": "device-id",
160+
"value": "some-unique-device-id",
161+
"type": "text"
162+
}
163+
],
164+
"body": {
165+
"mode": "formdata",
166+
"formdata": []
167+
},
168+
"url": "{{URL}}auth/refresh"
169+
},
170+
"response": []
171+
},
172+
{
173+
"name": "Forgot Password Request",
174+
"request": {
175+
"method": "POST",
176+
"header": [
177+
{
178+
"key": "device-id",
179+
"value": "some-unique-device-id",
180+
"type": "text"
181+
}
182+
],
183+
"body": {
184+
"mode": "raw",
185+
"raw": "{\r\n \"email\": \"[email protected]\"\r\n}",
186+
"options": {
187+
"raw": {
188+
"language": "json"
189+
}
190+
}
191+
},
192+
"url": "{{URL}}auth/forgot-password"
193+
},
194+
"response": []
195+
},
196+
{
197+
"name": "Reset Password",
198+
"request": {
199+
"method": "PUT",
200+
"header": [
201+
{
202+
"key": "device-id",
203+
"value": "some-unique-device-id",
204+
"type": "text"
205+
}
206+
],
207+
"body": {
208+
"mode": "raw",
209+
"raw": "{\r\n \"verification_code\": \"000000\",\r\n \"email\": \"[email protected]\",\r\n \"new_password\": \"new_password\"\r\n}",
210+
"options": {
211+
"raw": {
212+
"language": "json"
213+
}
214+
}
215+
},
216+
"url": "{{URL}}auth/reset-password"
217+
},
218+
"response": []
219+
},
220+
{
221+
"name": "Get User Profile",
222+
"request": {
223+
"auth": {
224+
"type": "bearer",
225+
"bearer": {
226+
"token": "{{JWT}}"
227+
}
228+
},
229+
"method": "GET",
230+
"header": [
231+
{
232+
"key": "device-id",
233+
"value": "some-unique-device-id",
234+
"type": "text"
235+
}
236+
],
237+
"url": "{{URL}}users/me"
238+
},
239+
"response": []
240+
},
241+
{
242+
"name": "Verify Forgot Password",
243+
"request": {
244+
"method": "POST",
245+
"header": [
246+
{
247+
"key": "device-id",
248+
"value": "some-unique-device",
249+
"type": "text"
250+
}
251+
],
252+
"body": {
253+
"mode": "raw",
254+
"raw": "{\r\n \"verification_code\": \"000000\",\r\n \"email\": \"[email protected]\"\r\n}",
255+
"options": {
256+
"raw": {
257+
"language": "json"
258+
}
259+
}
260+
},
261+
"url": "{{URL}}auth/verify-forgot-password-code"
262+
},
263+
"response": []
264+
}
265+
]
266+
}

0 commit comments

Comments
 (0)