Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaimSet ¶
type ClaimSet struct { // JWT 4.1 Registered Claim Names Issuer string `json:"iss,omitempty"` // JWT 4.1.1 Subject string `json:"sub,omitempty"` // JWT 4.1.2 Audience string `json:"aud,omitempty"` // JWT 4.1.3 ExpirationDate int64 `json:"exp,omitempty"` // JWT 4.1.4 NotBefore int64 `json:"nbf,omitempty"` // JWT 4.1.5 IssuedAt int64 `json:"iat,omitempty"` // JWT 4.1.6 JWTId string `json:"jti,omitempty"` // JWT 4.1.7 // Public Claim Names JWT 4.2 or Private Claim Names JWT 4.3 AdditionalClaims map[string]interface{} `json:"-"` }
ClaimSet implements the JWT 4
func (*ClaimSet) IsValid ¶
func (c *ClaimSet) IsValid(expected ClaimValidation) bool
type ClaimValidation ¶
type JWT ¶
JWT represents a JWT token consisting of a JWS Header (JWS 4), a JWT Claimset (JWT 4)
func DecodeAndVerify ¶
func DecodeAndVerify(message string, sv jwa.SignerVerifier) (*JWT, error)
DecodeAndVerify decodes the given message using the given SignerVerifier TODO (0x434D53): Check the SignerVerifier.Alg() matches the Algorithm given in the Header
func (*JWT) EncodeAndSign ¶
func (j *JWT) EncodeAndSign(sv jwa.SignerVerifier) (string, error)
EncodeAndSign encodes and signs the JWT token using the given SignerVerifier TODO (0x434D53): Check the SignerVerifier.Alg() matches the Algorithm given in the Header
Click to show internal directories.
Click to hide internal directories.