Requires registration and login.
requires a registered and confirmed account and respond back with a valid JWT token if successful. The token has to be sent with each authenticated request in the header.
request:
{
"email" : "[email protected]",
"password" : "12345678"
}
response:
{
"email": "[email protected]",
"token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhc2RAdGVzLmNvbWUiLCJpYXQiOjE1NzIwMzk5NzksImV4cCI6MTU3MjA0MzU3OX0.wTFlKBfEyw1jQMQ_dO0dgmYf7gVkYHZxc5hQRBXKUmU"
}
Requires a non blank and valid email, name and password.
request:
{
"name":"Nelson",
"email":"[email protected]",
"password":"Test@123"
}
response:
{
"response": "User created successfully"
}
Has to be called for the account to be confirmed. Token should have been sent to the user's email but for now it can be accessed using the admin endpoint below.
response:
{
"response": "User confirmed successfully"
}
Called to request a password change for a specific account. A valid reset token should have been sent to the user's email but for now it can be accessed using the admin endpoint below.
request:
{
"email":"[email protected]"
}
response:
{
"response": "Password change request initiated, please check your email"
}
Called with a valid and confirmed email who requested a change to its password, a new password and the reset token that was send to his email.
request:
{
"email":"[email protected]",
"password":"testtest",
"token":"dba8158a-685d-467b-ac6b-38cb2ed3e2af"
}
response:
{
"response": "Password changed successfully"
}
Used as a testing endpoint to get the password reset token
response:
{
"name": "testing",
"email": "[email protected]",
"is_password_reset_requested": false,
"password_reset_token": "87afbf1b-96ef-436a-b8bd-f05a53e2ebee"
}
Used as a testing endpoint to get the email confirmation token
response:
{
"name": "testing",
"email": "[email protected]",
"is_registration_confirmed": false,
"registration_token": "87afbf1b-96ef-436a-b8bd-f05a53e2ebee"
}
There are 23 tests that cover most of the functionality described above.