-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from neverovski/feature/forgot-password
Feature/forgot password
- Loading branch information
Showing
87 changed files
with
1,095 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,72 @@ | ||
### LOGS USER INTO THE SYSTEM BY EMAIL AND PASSWORD | ||
POST {{host}}/api/auth/login | ||
Content-Type: application/json | ||
### LOGIN [USER] | ||
# @name loginUser | ||
POST {{apiUrl}}/auth/login | ||
|
||
{ | ||
"email": "test@test.com1", | ||
"password": "12345678" | ||
"email": "{{$dotenv REST_USER_LOGIN}}", | ||
"password": "{{$dotenv REST_USER_PASSWORD}}" | ||
} | ||
|
||
### LOGOUT [USER] | ||
POST {{apiUrl}}/auth/logout | ||
Authorization: Bearer {{loginUser.response.body.data.accessToken}} | ||
|
||
### LOGS OUT CURRENT LOGGED-IN USER SESSION | ||
POST {{host}}/api/auth/logout | ||
Authorization: Bearer {{accessToken}} | ||
Content-Type: application/json | ||
### LOGOUT [USER] | ||
POST {{apiUrl}}/auth/logout | ||
Cookie: accessToken={{loginUser.response.body.data.accessToken}} | ||
|
||
### FORGOT PASSWORD | ||
POST {{host}}/api/auth/forgot-password | ||
Content-Type: application/json | ||
### REFRESH-TOKEN [USER] | ||
POST {{apiUrl}}/auth/refresh-token | ||
|
||
{ | ||
"email": "{{email}}" | ||
"refreshToken": "{{loginUser.response.body.data.refreshToken}}" | ||
} | ||
|
||
### RESET PASSWORD | ||
POST {{host}}/api/auth/reset-password | ||
Content-Type: application/json | ||
|
||
{ | ||
"token": "{{passwordToken}}", | ||
"password": "{{newPassword}}" | ||
} | ||
|
||
### REFRESH TOKEN | ||
POST {{host}}/api/auth/refresh-token | ||
Content-Type: application/json | ||
### LOGS USER INTO THE SYSTEM THROUGH A APPLE | ||
POST {{apiUrl}}/auth/platform | ||
|
||
{ | ||
"refreshToken": "{{refreshToken}}" | ||
"token": "{{$dotenv REST_APPLE_TOKEN}}", | ||
"platform": "apple" | ||
} | ||
|
||
### LOGS USER INTO THE SYSTEM THROUGH A FACEBOOK | ||
POST {{host}}/api/auth/platform | ||
Content-Type: application/json | ||
POST {{apiUrl}}/auth/platform | ||
|
||
{ | ||
"token": "{{facebookToken}}", | ||
"token": "{{$dotenv REST_FACEBOOK_TOKEN}}", | ||
"platform": "facebook" | ||
} | ||
|
||
### LOGS USER INTO THE SYSTEM THROUGH A APPLE | ||
POST {{host}}/api/auth/platform | ||
Content-Type: application/json | ||
|
||
### LOGS USER INTO THE SYSTEM THROUGH A GOOGLE | ||
POST {{apiUrl}}/auth/platform | ||
|
||
{ | ||
"token": "{{appleToken}}", | ||
"platform": "apple" | ||
"token": "{{$dotenv REST_GOOGLE_TOKEN}}", | ||
"platform": "github" | ||
} | ||
|
||
### LOGS USER INTO THE SYSTEM THROUGH A GITHUB | ||
POST {{host}}/api/auth/platform | ||
Content-Type: application/json | ||
POST {{apiUrl}}/auth/platform | ||
|
||
{ | ||
"token": "{{githubToken}}", | ||
"token": "{{$dotenv REST_GITHUB_TOKEN}}", | ||
"platform": "github" | ||
} | ||
|
||
### FORGOT PASSWORD BY EMAIL | ||
POST {{apiUrl}}/auth/password/email | ||
|
||
{ | ||
"email": "{{$dotenv REST_USER_LOGIN}}" | ||
} | ||
|
||
### RESET PASSWORD BY EMAIL | ||
POST {{apiUrl}}/auth/password/reset/email | ||
|
||
{ | ||
"email": "{{$dotenv REST_USER_LOGIN}}", | ||
"token": "b70e0419-9839-4a6e-a799-8580e929e5a9", | ||
"password": "{{$dotenv REST_USER_PASSWORD}}" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,39 @@ | ||
### RETURN A CURRENT USER | ||
GET {{host}}/api/users/current | ||
Content-Type: application/json | ||
### RETURN A CURRENT USER [USER] | ||
GET {{apiUrl}}/users/current | ||
Authorization: Bearer {{dotenv REST_USER_ACCESS_TOKEN}} | ||
|
||
### UPDATE A CURRENT USER | ||
PUT {{host}}/api/users/current | ||
Authorization: Bearer {{accessToken}} | ||
Content-Type: application/json | ||
### CREATE A USER [USER] | ||
POST {{apiUrl}}/users | ||
|
||
{ | ||
"email": "{{$dotenv REST_USER_LOGIN}}", | ||
"password": "{{$dotenv REST_USER_PASSWORD}}", | ||
"profile": { | ||
"firstName": "Dmitry", | ||
"lastName": "Neverovski" | ||
"firstName": "D.", | ||
"lastName": "N." | ||
} | ||
} | ||
|
||
### CREATE A USER | ||
POST {{host}}/api/users | ||
Content-Type: application/json | ||
### UPDATE A CURRENT USER [USER] | ||
PUT {{apiUrl}}/users/current | ||
Authorization: Bearer {{dotenv REST_USER_ACCESS_TOKEN}} | ||
|
||
{ | ||
"email": "{{email}}", | ||
"password": "{{password}}", | ||
"profile": { | ||
"firstName": "D.", | ||
"lastName": "N." | ||
"firstName": "Dmitry", | ||
"lastName": "Neverovski" | ||
} | ||
} | ||
|
||
### CHANGE PASSWORD FOR A CURRENT USER | ||
POST {{host}}/api/users/current/change-password | ||
Authorization: Bearer {{accessToken}} | ||
Content-Type: application/json | ||
### CHANGE PASSWORD FOR A CURRENT USER [USER] | ||
POST {{apiUrl}}/users/current/change-password | ||
Authorization: Bearer {{dotenv REST_USER_ACCESS_TOKEN}} | ||
|
||
{ | ||
"oldPassword": "{{password}}", | ||
"newPassword": "{{newPassword}}" | ||
"oldPassword": "{{$dotenv REST_USER_PASSWORD}}", | ||
"newPassword": "87654321" | ||
} | ||
|
||
### DELETE A CURRENT USER | ||
DELETE {{host}}/api/users/current | ||
Authorization: Bearer {{accessToken}} | ||
Content-Type: application/json | ||
### DELETE A CURRENT USER [USER] | ||
DELETE {{apiUrl}}/users/current | ||
Authorization: Bearer {{dotenv REST_USER_ACCESS_TOKEN}} |
Oops, something went wrong.