jwt

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenToken

func GenToken(c *Config, info string) (string, error)

Types

type Config

type Config struct {
	ID         string
	SigningKey string
	Issuer     string
	Subject    string
	Audience   []string
	Expires    xtime.Duration
}

type MyClaims

type MyClaims struct {
	Info string `json:"info"`
	jwtV4.RegisteredClaims
}

func ParseToken

func ParseToken(c *Config, tokenStr string) (*MyClaims, error)

Jump to

Keyboard shortcuts

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