jwt

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL