redis_cookie_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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const COOKIE_NAME_TOKEN = "token"
View Source
const COOKIE_NAME_UID = "uid"
View Source
const GIN_META_UID = "cauth:uid"
View Source
const RED_KEY_PREF = "cauth:"

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisCookieAuth

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

func New

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

func (*RedisCookieAuth) Middleware

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

func (*RedisCookieAuth) Set

func (a *RedisCookieAuth) Set(gc *gin.Context, uid string, ttl time.Duration) error

Jump to

Keyboard shortcuts

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