JWT Validation missing fields
domgolonka opened this issue · 3 comments
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": "domgolonka@domgolonka.com",
"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.
This one is super annoying. Actually, it makes /oauth/userinfo endpoint useless.
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:
go-client/pkg/fusionauth/Domain.go
Line 1724 in 840527e
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!