jwt

package
v0.0.0-...-58fd0e2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(conf *koanf.Koanf) *Client

func (*Client) Generate

func (c *Client) Generate(userID int64) (string, error)

func (*Client) Parse

func (c *Client) Parse(tokenString string) (jwt.MapClaims, error)

Parse the token string

func (*Client) Validate

func (c *Client) Validate(tokenString string) error

Validate validate

type CustomClaims

type CustomClaims struct {
	UserID int64 `json:"user_id"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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