Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT token decoding is not done #1297

Closed
AdamISZ opened this issue May 31, 2022 · 1 comment · Fixed by #1480
Closed

JWT token decoding is not done #1297

AdamISZ opened this issue May 31, 2022 · 1 comment · Fixed by #1480

Comments

@AdamISZ
Copy link
Member

AdamISZ commented May 31, 2022

Recent merging of #1291 reminded me that this has not been done.
Currently we use this as a token and intended for it to expire, but as you can see from jmclient.wallet_rpc.JMWalletDaemon.check_cookie we are only checking the encoded secret and not decoding it.

if request_cookie==None or self.cookie != request_cookie:

I would appreciate it if someone researches (or already knows) the best way to use such JWT tokens could chime in and either PR or just explain the best way to use them for our use case. What we have now is extremely crude.

@AdamISZ
Copy link
Member Author

AdamISZ commented Sep 11, 2022

Added help wanted because this is certainly something that someone, especially someone even moderately familiar with JWT or API authentication in general, could do, instead of me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant