Closed varshakamath1 closed 3 years ago
POST: http://localhost:3001/login
Request body: { "username": "PID5", "password":"PID5", "newPassword":"", "role": "patient" }
Response { "accessToken": "XXX", "refreshToken": "YYY" }
accessToken expires in 5 minutes. Any request made using the accessToken after 5 minutes returns the response as FORBIDDEN.
POST: http://localhost:3001/token
Request body:
{ "role": "patient", "token" : "YYY" //refreshToken }
Response { "accessToken": "ZZZ" // new accessToken }
DELETE: http://localhost:3001/logout
Request body: { "token" : "YYY" //refreshToken }
Response: 204 status
Task linked: CU-djy95a Make jwt more secure using refresh token and algorithm
POST: http://localhost:3001/login
Request body: { "username": "PID5", "password":"PID5", "newPassword":"", "role": "patient" }
Response { "accessToken": "XXX", "refreshToken": "YYY" }
accessToken expires in 5 minutes. Any request made using the accessToken after 5 minutes returns the response as FORBIDDEN.
POST: http://localhost:3001/token
Request body:
{ "role": "patient", "token" : "YYY" //refreshToken }
Response { "accessToken": "ZZZ" // new accessToken }
DELETE: http://localhost:3001/logout
Request body: { "token" : "YYY" //refreshToken }
Response: 204 status