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

Add support for version detection when decoding #4

Open
daviddesmet opened this issue Nov 25, 2018 · 0 comments
Open

Add support for version detection when decoding #4

daviddesmet opened this issue Nov 25, 2018 · 0 comments
Labels
enhancement New feature or request pinned This issue will never be considered stale

Comments

@daviddesmet
Copy link
Owner

daviddesmet commented Nov 25, 2018

Currently you need to specify the version when decoding.

It will be nice to omit this and have the functionality to auto-detect it. Shouldn't be an issue since it's specified on the header, however, the library is considering the ability to support custom protocols by just implementing the IPasetoProtocol interface. Even though user-defined homemade protocols are discouraged by Paseto but are allowed as long as the reserved official naming convention is not used. Read here for more information.

Anyway, the library could read the header version and try to find a match using the Version property from the registered protocols.

@daviddesmet daviddesmet added enhancement New feature or request pinned This issue will never be considered stale labels Nov 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned This issue will never be considered stale
Projects
None yet
Development

No branches or pull requests

1 participant