tokens

package
v0.0.0-...-6ef915d Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var K = Keys{Name: Timername(), Key: []byte(Timerkey()), Seven: []byte(Sevenkey()), Claims: claimer}

Functions

func Checktoken

func Checktoken(t string) bool

func Checktokencontext

func Checktokencontext(t string) bool

func ContextToken

func ContextToken() string

func CreateHash

func CreateHash(key string) string

func HeadTokerner

func HeadTokerner(k interface{}) string

func Keyen

func Keyen() []byte

func Overrideclaims

func Overrideclaims(t string)

func Sevenkey

func Sevenkey() []byte

func Timerkey

func Timerkey() []byte

func Timername

func Timername() string

func Tokerner

func Tokerner() string

Types

type Keys

type Keys struct {
	Name   string
	Key    []byte
	Seven  []byte
	Claims MyCustomClaims
}

type MyCustomClaims

type MyCustomClaims struct {
	Name   string `json:"name"`
	Admin  bool   `json:"admin"`
	Claims jwt.StandardClaims
}

func (MyCustomClaims) Valid

func (j MyCustomClaims) Valid() error

Jump to

Keyboard shortcuts

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