diff --git a/jwt/claims.go b/jwt/claims.go index 8f836f9..cc0487e 100644 --- a/jwt/claims.go +++ b/jwt/claims.go @@ -16,6 +16,9 @@ type Scope []AccessPolicy type Claims interface { jwtgo.Claims + // GetID returns the JTI field of the claims. + GetID() string + // GetScope returns the scope of the claims as a slice of access policies. GetScope() Scope @@ -33,6 +36,11 @@ type DefaultClaims struct { Scope Scope `json:"scope,omitempty"` } +// GetID returns the JTI field of the DefaultClaims. +func (c *DefaultClaims) GetID() string { + return c.ID +} + // GetScope returns the scope of the DefaultClaims as a slice of access policies. func (c *DefaultClaims) GetScope() Scope { return c.Scope