Add token renewal backend
This commit is contained in:
@@ -9,11 +9,27 @@ Content-Type: application/json
|
||||
|
||||
> {%
|
||||
client.global.set("token", response.body.token);
|
||||
client.global.set("refreshToken", response.body.refreshToken);
|
||||
client.test("Request executed successfully", function() {
|
||||
client.assert(response.status === 200, "Response status is not 200");
|
||||
});
|
||||
%}
|
||||
|
||||
### Refresh token
|
||||
POST http://localhost:8081/user/refresh_token
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"refreshToken": "{{refreshToken}}"
|
||||
}
|
||||
|
||||
> {%
|
||||
client.test("Request executed successfully", function() {
|
||||
client.global.set("token", response.body.token);
|
||||
client.assert(response.status === 200, "Response status is not 200");
|
||||
});
|
||||
%}
|
||||
|
||||
### Get notes
|
||||
GET http://localhost:8081/notes
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
Reference in New Issue
Block a user