Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HeaderAlgRSA256 is the RS256 [Header.Algorithm]. HeaderAlgRSA256 = "RS256" // HeaderAlgES256 is the ES256 [Header.Algorithm]. HeaderAlgES256 = "ES256" // HeaderType is the standard [Header.Type]. HeaderType = "JWT" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Claims ¶
type Claims struct {
// Iss is the issuer JWT claim.
Iss string `json:"iss"`
// Scope is the scope JWT claim.
Scope string `json:"scope,omitempty"`
// Exp is the expiry JWT claim. If unset, default is in one hour from now.
Exp int64 `json:"exp"`
// Iat is the subject issued at claim. If unset, default is now.
Iat int64 `json:"iat"`
// Aud is the audience JWT claim. Optional.
Aud string `json:"aud"`
// Sub is the subject JWT claim. Optional.
Sub string `json:"sub,omitempty"`
// AdditionalClaims contains any additional non-standard JWT claims. Optional.
AdditionalClaims map[string]interface{} `json:"-"`
}
Claims represents the claims set of a JWT.
Click to show internal directories.
Click to hide internal directories.