4d / 4D-NetKit

4D NetKit is a built-in 4D component that allows you to interact with third-party web services and their APIs.
Other
10 stars 8 forks source link

jwt header missing kid, for google service accounts? #70

Open macMikey opened 2 weeks ago

macMikey commented 2 weeks ago

google service account docs for the jwt header includes a header kid, which is the private key id. this is described in Forming the JWT header example: {"alg":"RS256","typ":"JWT", "kid":"370ab79b4513eb9bad7c9bd16a95cb76b5b2a56a"}

e-marchand commented 2 weeks ago

I see in code here for a jwt

https://github.com/4d/4D-NetKit/blob/a77462e4704ec889fe8eee884e735fe8232b57db/Project/Sources/Classes/OAuth2Provider.4dm#L543

So the feature could be as I understand, allow to add "kid"?

macMikey commented 2 weeks ago

maybe. i have oauth2 working with service accounts with my 4d google lib. i have kid, and some of the other features i've identified in other issues implemented in my JWT generator (but that doesn't mean that it can't work without it. stay tuned, still testing/breaking the library).

macMikey commented 1 week ago

this goes along with #71. see this comment for how i propose implementing this.