Skip to content

GetID in the Claims interface ? #334

Open
Listed in
Open
@zaakn

Description

@zaakn

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

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

jwt/claims.go

Lines 9 to 16 in 8aa5d6c

type Claims interface {
GetExpirationTime() (*NumericDate, error)
GetIssuedAt() (*NumericDate, error)
GetNotBefore() (*NumericDate, error)
GetIssuer() (string, error)
GetSubject() (string, error)
GetAudience() (ClaimStrings, error)
}

Activity

oxisto

oxisto commented on Aug 14, 2023

@oxisto
Collaborator

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.

added
nextThe next iteration of development, currently `v6`
on Aug 14, 2023
st3fan

st3fan commented on Oct 9, 2023

@st3fan

I submitted #352 earlier today.

linked a pull request that will close this issueAdd ID to Claims interface #352on Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    nextThe next iteration of development, currently `v6`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @st3fan@zaakn@oxisto

      Issue actions

        `GetID` in the `Claims` interface ? · Issue #334 · golang-jwt/jwt