token

package
v0.0.0-...-9be0976 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomClaims

type CustomClaims struct {
	UserName string `json:"user_name"`
	jwt.StandardClaims
}

CustomClaims

type Token

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

Token jwt service

func InitConfig

func InitConfig(source source.Source, path ...string) (*Token, error)

InitConfig

func (*Token) Decode

func (srv *Token) Decode(tokenStr string) (*CustomClaims, error)

Decode

func (*Token) Encode

func (srv *Token) Encode(issuer, userName string, expireTime int64) (string, error)

Encode

Jump to

Keyboard shortcuts

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