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

Missing JWT Fields #46

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Missing JWT Fields #46

wants to merge 2 commits into from

Conversation

domgolonka
Copy link

#45

@robotdan
Copy link
Member

Thanks for the contribution @domgolonka .

This one is kinda tricky, this is a generated file.

Here is the template, and the JWT object definition.
https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/client/go.domain.ftl
https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/domain/io.fusionauth.jwt.domain.JWT.json

This object DSL is built from https://github.com/FusionAuth/fusionauth-jwt/blob/master/src/main/java/io/fusionauth/jwt/domain/JWT.java.

The additional fields you're looking for are claims defined by OIDC, but not in the JWT spec. In our Java client, these fields get de-serialized into the otherClaims field, and when we serialize the object it gets flattened.

We would need to identify if Go has a similar capability - to support these dynamic fields. I could also add a claim named foo to the JWT, but we can't define it ahead of time because we don't know what the JWT will contain.

@mooreds
Copy link
Contributor

mooreds commented Jan 5, 2022

@domgolonka any interest in looking at how to support dynamic fields?

If not, I can close this PR.

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

Successfully merging this pull request may close these issues.

None yet

3 participants