jwt

package
v2.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CREATE = "Create"
	READ   = "Read"
	UPDATE = "Update"
	DELETE = "Delete"
)

const

Variables

This section is empty.

Functions

func SignJWT

func SignJWT(issue, expire int64, subject, scope string, key crypto.PrivateKey) (string, error)

SignJWT creates a JWT

Types

type JWT

type JWT struct {
	IssuedAt   int64
	ExpiresAt  int64
	Issuer     string
	Subject    string
	Scope      string
	SignMethod string
	SigHex     string
}

JWT is a JWT object

func VerifyJWT

func VerifyJWT(jwtString string) (*JWT, error)

VerifyJWT verifies the JWT

Jump to

Keyboard shortcuts

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