ATProtoKit
ATProtoKit copied to clipboard
[Feature Request]: Parse and validate session tokens
Summary
Methods related to session tokens will be needed.
Pain points
At this time, ATProtocolConfiguration's getSession and refreshSession has a few lines of code that shouldn't run unless they're absolutely necessary. There needs to be a way for the session tokens to be parsed so as to find out the issue and expiry dates, as well as the signature. The signature should be able to be validated; the public key is located under UserSession.didDocument.verificationMethod[#].publicKeyMultibase.
Considered Alternatives
No response
Is this a breaking change?
No
Library Examples
No response
Additional Context
No response
Version 0.22.0 now allows you to parse the session tokens. However, while this is complete, there is not yet a way to validate the token.
In order to do this, we'll need a cryptography package. Which means this issue is blocked from closing until #88 is completed.
SessionToken is available in ATCryptography now, and will be the new home for that struct. ATProtoKit will soon have its own version deprecated and removed; if you want to still use it, please add ATCryptography as a dependency in your project.
Because of this, I will consider this issue closed.