-
Notifications
You must be signed in to change notification settings - Fork 49
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
ParseApiServerJwt outdated? #159
Comments
The problem appears to be that this function is used nowhere, and so has not been updated for some time. Take for example the use of Line 466 in f00b9f8
|
In fact the problem is that on line 455 the claims are passed directly, but instead a pointer to it should be passed. However, fixing that will not help you unfortunately. This function was intended to be used for JWTs emitted by the now deprecated predecessor of the We don't currently seem to have a function for parsing modern JWTs. However, the following should work: claims := &struct {
jwt.StandardClaims
*server.SessionResult
}{}
_, err := jwt.ParseWithClaims(inputJwt, claims, func(token *jwt.Token) (interface{}, error) {
return signingKey, nil
}) Thanks for pointing this out, anyway. We'll either fix this bug or perhaps remove this function altogether, since the |
Thanks for the explanation; I was suspecting something like that. It would be useful though to have an authoritative way to check modern JWTs, be it in irmago or elsewhere. The example code does not check |
Yes, that's right. I see how such code would be useful, but it would apply not just to JWTs (which contain a |
It seems
ParseApiServerJwt
no longer works:The text was updated successfully, but these errors were encountered: