jwt

package
v0.0.0-...-97dd610 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IssuerKey     = "iss"
	SubjectKey    = "sub"
	CommonNameKey = "cn"
	ExpireKey     = "exp"
	ExtensionsKey = "ext"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Subject    string
	Extensions string
	CommonName string
	ExpireTime int64
}

func NewClaims

func NewClaims(subject, extensions, commonName string, cardinality int64) *Claims

func Verify

func Verify(pub *ecdsa.PublicKey, token string) (*Claims, error)

func (*Claims) Sign

func (t *Claims) Sign(pri *ecdsa.PrivateKey) (string, error)

Jump to

Keyboard shortcuts

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