hwsc-org / hwsc-user-svc

Provides services to hwsc-app-gateway-svc for managing HWSC users
0 stars 1 forks source link

Make JSON Email Token for verifying user's email #117

Closed faraonc closed 5 years ago

faraonc commented 5 years ago

Tasks:

CreateUser: https://hwsc-org.github.io/wikis/app-gateway-svc/epics.html#createuser VerifyEmailToken: https://hwsc-org.github.io/wikis/app-gateway-svc/epics.html#verifyemailtoken

Allows generating of email token. generateEmailToken will be refactor to hwsc-lib in a different pull request and task.

Unit test: https://github.com/hwsc-org/hwsc-user-svc/pull/117/checks?check_run_id=89578202 Integration test:

[SUCCESS] GetStatus - valid
[SUCCESS] CreateUser - valid
[SUCCESS] CreateUser - test null user
[SUCCESS] CreateUser - test empty user
[SUCCESS] GetUser - valid
[SUCCESS] GetUser - test non existent uuid
[SUCCESS] DeleteUser - valid, delete existing user
[SUCCESS] DeleteUser - test non existent uuid
[SUCCESS] UpdateUser - valid
[SUCCESS] UpdateUser - test non existent uuid
[SUCCESS] AuthenticateUser - valid
[SUCCESS] AuthenticateUser - test invalid UUID
[SUCCESS] NewSecret - test generating new secret
[SUCCESS] GetSecret - test retrieve active secret
[SUCCESS] GetToken - get token for user with no previous token
[SUCCESS] GetToken - get same/unexpired token for same user
[SUCCESS] VerifyAuthToken - get existing token paired with secret
[SUCCESS] VerifyEmailToken - verify existing token
[SUCCESS] VerifyEmailToken - test non-existing token
faraonc commented 5 years ago

~We can try the integration test later.~