jwtutils

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HS256 = "HS256"
	HS384 = "HS384"
	HS512 = "HS512"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JWT

type JWT struct {
	// contains filtered or unexported fields
}

func New

func New(secretKey string) (*JWT, error)

func (*JWT) CreateToken

func (j *JWT) CreateToken(claims jwt.Claims) (string, error)

func (JWT) ParseToken

func (j JWT) ParseToken(token string, claims jwt.Claims) error

func (*JWT) SecretKey

func (j *JWT) SecretKey() string

Jump to

Keyboard shortcuts

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