Skip to content

Experiment: use JWT action token to implement the feature of 'send token by email adress' #457

@dadiorchen

Description

@dadiorchen

As proposed in this picture below, we want to use wallet API to issue Action Token and send token to an account that will be registered in the future. So in this issue, we will implement a integration test that covers:

  1. An endpoint to issue a JWT token with the content shown on the picture: the example action token.
  2. An endpoint to receive this action token and verify the token then do wallet transfer.
  3. The edge case that action token is expired, the request is denied.

Send_token_by_email drawio

In details, the integration tests are:

  1. A test: a wallet account that owns tokens, the account issue a Action Token, simulates a new user coming in and create new wallet account, then apply the token that specified in the action token, wallet API verify the action token, if okay, then do the transfer, if not, deny it.
  2. Based on the test story above, simulate the token expiration, at this case, the token application is denied.

Reference reading:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions