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

For func (t *JSONWebToken) Claims..., allow passing in options for the json decoder? #105

Open
aaomidi opened this issue Mar 7, 2024 · 1 comment

Comments

@aaomidi
Copy link

aaomidi commented Mar 7, 2024

For example, if I want to parse all the claims into map[string]any for easier looping over them, I might want the JSON decoder to use the following option: https://pkg.go.dev/encoding/json#Decoder.UseNumber

Alternatively, maybe something that can allow the user to specify what JSON decoder to use can also work. Whatever (if any) the preference is I can send in a PR for it.

@mcpherrinm
Copy link
Collaborator

I don't think we should make any JSON changes until at least encoding/json/v2 comes out and we have a plan to de-fork our internal JSON decoder.

JSON decoding is security-sensitive in JOSE, so I don't think it will be generally safe to accept decoder options or allow user-specified decoding.

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

No branches or pull requests

2 participants