token

package
v0.0.0-...-93c743e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSecret = "jwt-him-secret"
)

DefaultSecret 测试使用

Variables

This section is empty.

Functions

func Generate

func Generate(secret string, token *Token) (string, error)

Generate a JWT token

Types

type Token

type Token struct {
	Account string `json:"acc,omitempty"`
	App     string `json:"app,omitempty"`
	Exp     int64  `json:"exp,omitempty"`
}

Token Token

func Parse

func Parse(secret, tk string) (*Token, error)

Parse ParseJwtToken

func (*Token) Valid

func (t *Token) Valid() error

Valid Valid

Jump to

Keyboard shortcuts

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