Get token function
RobertIndie opened this issue · 1 comments
RobertIndie commented
This function is responsible for validating the user name and password. It will return a token to the user.
Input event is as below:
{
"userName": "user-a",
"password": "pwd"
}
Output event is as below:
{
"token": "xxx"
}
This function should only care about the fields that need to be cared about and should not change fields that are not related to it.
For example, when the input is :
{
"requestId": "1",
"userName": "user-a",
"password": "pwd"
}
It should output the event as below:
{
"requestId": "1",
"token": "xxx"
}
As you can see, it did not change the field requestId
.
This function validates the user login information through a database like MySQL.
- Implement Get Token function
- Unit tests
RobertIndie commented
Implemented by #70