utils

package
v3.2.12 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRefreshToken added in v3.2.0

func CreateRefreshToken(secret string, method string, token string) (string, error)

func CreateToken added in v3.1.0

func CreateToken(secret string, method string, claims jwt.MapClaims, expire int) (string, error)

func Validate

func Validate(v interface{}) (string, error)

func ValidateRefreshToken added in v3.2.0

func ValidateRefreshToken(secret string, method string, tokenString string) (jwt.MapClaims, error)

func ValidateToken added in v3.1.0

func ValidateToken(secret string, signing string, bearerToken string) (jwt.MapClaims, error)

Types

type Cache

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

func NewCache

func NewCache(lifetime time.Duration) *Cache

func (*Cache) Get

func (c *Cache) Get(key string) (interface{}, bool)

func (*Cache) Invalidate

func (c *Cache) Invalidate(key string)

func (*Cache) Set

func (c *Cache) Set(key string, value interface{})

type Type

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

func NewType

func NewType() Type

func (Type) List

func (t Type) List() map[string]string

func (Type) Value

func (t Type) Value(key string) string

Jump to

Keyboard shortcuts

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