golang-jwt / jwt

Go implementation of JSON Web Tokens (JWT).
https://golang-jwt.github.io/jwt/
MIT License
6.99k stars 336 forks source link

`GetID` in the `Claims` interface ? #334

Open zaakn opened 1 year ago

zaakn commented 1 year ago

Is there a special consideration for the absence of the GetID() function?

https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7

https://github.com/golang-jwt/jwt/blob/8aa5d6cef84fa859f10fed5db50bee48efc5f160/claims.go#L9-L16

oxisto commented 1 year ago

That was probably an oversight on my part. The RegisteredClaims struct already has the appropriate field though.

Unfortunately, we cannot add anything to the interface without API breakage, meaning we need to reserve this for a potential v6.

st3fan commented 11 months ago

I submitted #352 earlier today.