redis_token_auth

package
v0.0.0-...-62a34bc Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GIN_META_UID = "tauth:uid"
View Source
const RED_KEY_PREF = "tauth:"

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisTokenAuth

type RedisTokenAuth struct {
	*redis_auth.RedisAuth
	// contains filtered or unexported fields
}

func New

func New(red *redis.Client, namespace string) *RedisTokenAuth

func (*RedisTokenAuth) Middleware

func (a *RedisTokenAuth) Middleware() gin.HandlerFunc

func (*RedisTokenAuth) Set

func (a *RedisTokenAuth) Set(uid string, ttl time.Duration) (string, error)

Jump to

Keyboard shortcuts

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