jwt

package module
v0.0.0-...-742cc99 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: Unlicense Imports: 7 Imported by: 0

README

JWT library for Go

Documentation

Index

Constants

View Source
const (
	AlgNone  = "none"
	AlgHS256 = "HS256"
	AlgHS384 = "HS384"
	AlgHS512 = "HS512"
)

Variables

View Source
var (
	ErrInvalidHeader    = errors.New("Invalid header")
	ErrInvalidToken     = errors.New("Invalid token")
	ErrInvalidAlgorithm = errors.New("Invalid algorithm")
	ErrInvalidSignature = errors.New("Invalid signature")
)

Functions

func GetPayload

func GetPayload(token string, key []byte) (string, error)

func NewToken

func NewToken(payload []byte, algorithm string, key []byte) (string, error)

func Validate

func Validate(token string, key []byte) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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