jwt icon indicating copy to clipboard operation
jwt copied to clipboard

`GetID` in the `Claims` interface ?

Open zaakn opened this issue 1 year ago • 2 comments

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

zaakn avatar Aug 13 '23 14:08 zaakn

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.

oxisto avatar Aug 14 '23 05:08 oxisto

I submitted #352 earlier today.

st3fan avatar Oct 09 '23 19:10 st3fan