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 Validation missing fields #45

Open
domgolonka opened this issue Nov 24, 2020 · 3 comments
Open

JWT Validation missing fields #45

domgolonka opened this issue Nov 24, 2020 · 3 comments

Comments

@domgolonka
Copy link

domgolonka commented Nov 24, 2020

When trying to do curl [GET] request to validate:

{
    "jwt": {
        "exp": 1606240095,
        "iat": 1606236495,
        "iss": "acme.com",
        "jti": "XXXXXX-XXXX-XXXX-XXXX-XXXXXXXX",
        "sub": "XXXXXX-XXXX-XXXX-XXXX-XXXXXXXX",
        "authenticationType": "PASSWORD",
        "email": "[email protected]",
        "email_verified": true,
        "preferred_username": "domgolonka"
    }
}

The above shows the email, email_verified, preferred_username, & authenticationType fields.

When trying to it using the client:

*fusionauth.JWT=&{<nil> 1606238646 1606235046 acme.com XXXXXX-XXXX-XXXX-XXXX-XXXXXXXX 0 map[] XXXXXX-XXXX-XXXX-XXXX-XXXXXXXX})

There are missing fields from the above.

@ynnt
Copy link

ynnt commented Dec 4, 2020

This one is super annoying. Actually, it makes /oauth/userinfo endpoint useless.

@robotdan
Copy link
Member

robotdan commented Dec 4, 2020

I agree, this is something we'd like to solve. If you have some ideas how to solve it - input is appreciated.

Here is the current struct def:

type JWT struct {

Here is article on dynamic JSON in Go:
https://eagain.net/articles/go-dynamic-json/

If anyone wants to submit a PR or a suggested change that would be great!

@robotdan
Copy link
Member

robotdan commented Dec 4, 2020

@iveelsm feel free to take a crack at this one if it looks interesting.

Possibly related issues
#34
#38

@iveelsm iveelsm removed their assignment Jul 6, 2021
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

4 participants