go-client
go-client copied to clipboard
Missing JWT Fields
#45
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.
@domgolonka any interest in looking at how to support dynamic fields?
If not, I can close this PR.