TBD54566975 / tbdex

56 stars 26 forks source link

[http-api] request tokens should be JWTs #210

Closed mistermoe closed 9 months ago

mistermoe commented 10 months ago

currently, the request token used to authenticate requests like GET /exchanges is a JWS that include:

Header:

Payload:

I'm proposing that we shift to using JWTs instead.

the JWT should contain the following:

Header:

Payload:

TODOs: PR to address this issue should:

mistermoe commented 10 months ago

cc: @jiyoontbd

jiyoonie9 commented 10 months ago

the todos here also mention adding nbf which is another timestamp. do we need this field in addition to jti (since that's essentially a timestamp as well)?

mistermoe commented 10 months ago

Good question @jiyoontbd! Can't think of a reason to include nbf. Down to leave it out if you are. Can't really see scenarios where people are generating and storing request tokens ahead of time that shouldn't be used until a specified time