Documentation ¶ Index ¶ func New(signer crypto.Signer, head, body map[string]any) (*string, error) func Validate(publicKey crypto.PublicKey, jwt string) (head, body map[string]any, err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New(signer crypto.Signer, head, body map[string]any) (*string, error) New This function takes a signer implementation and contents for a head and body, signs them, and returns a complete jwt func Validate ¶ func Validate(publicKey crypto.PublicKey, jwt string) (head, body map[string]any, err error) Validate This function takes a public key (must be a valid []byte if using the symmetric HS algorithms) and errors if the provided jwt isn't valid. The iat, nbf, and exp claims will be validated if present. The returned values are the head Types ¶ This section is empty. Source Files ¶ View all Source files jwt.go Click to show internal directories. Click to hide internal directories.