Repository navigation
User API Doc
Method: POST
Description: This method is used to login (be allocated a JWT token) a user with the specified username and password
Body Input
| Parameters | Format |
|---|---|
| login | LoginDTO Object |
Request Body example
{
"username": "YinWang"
"password": "password"
}
example request URL: https://localhost:5001/api/User/login
STATUS CODE: 404 NOT FOUND No username exists
STATUS CODE: 403 FORBIDDEN Incorrect password
STATUS CODE: 200 OK Successful login
The response of a successful login
{
"userName": "string",
"token": "<JWT token here>"
}
Method: POST
Description: Confirm if the given reset password token for a user is valid
Body Input
| Parameters | Format |
|---|---|
| resetPassword | ResetPasswordDTO Object |
Request Body example
{
"email": "YinWang@gmail.com"
"resetToken": "<reset token here>"
}
example request URL: https://localhost:5001/api/User/resetTokenCheck
STATUS CODE: 400 Bad Request No reset token exists
STATUS CODE: 200 OK Reset token exists
Method: POST
Description: Update the given user's password
Body Input
| Parameters | Format |
|---|---|
| login | LoginDto Object |
Request Body example
{
"email": "YinWang@gmail.com"
"password": "newpassword123"
}
example request URL: https://localhost:5001/api/User/resetPassWord
STATUS CODE: 404 NOT FOUND No username exists
STATUS CODE: 400 BAD REQUEST User does not have valid password change request
STATUS CODE: 200 OK Password successfully reset
Method: POST
Description: Send reset password link to user's E-mail
Body Input
| Parameters | Format |
|---|---|
| forgotPass | ForgotPassRequestDTO Object |
Request Body example
{
"userOrEmail": "YinWang"
}
example request URL: https://localhost:5001/api/User/resetPassWord
STATUS CODE: 404 NOT FOUND Invalid username/email sent
STATUS CODE: 200 OK
The response of a successful request password change
{
"email": "string",
"resetToken": "<Password reset token>"
}
- Home
- Data Model
- Architecture
- API Documentation
- Front End Documentation
- Testing
- Prototyping
- Other
- Contributing Guidelines and Etiquitte
- Labels
- License
- Admin