tokenmanager

package
v0.1.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTokenManager

type DBTokenManager struct {
}

DBTokenManager stores guid and expiry time to db and maintains them. todo: wirte clean up script to remove expired entries.

func (DBTokenManager) Delete

func (d DBTokenManager) Delete(ctx context.Context, id string) error

func (DBTokenManager) Get

func (d DBTokenManager) Get(id string) interface{}

func (DBTokenManager) Store

func (d DBTokenManager) Store(ctx context.Context, id string, userID int, expiry int64, claims map[string]interface{}) error

type TokenState

type TokenState struct {
	GUID   string `boil:"guid" json:"guid"`
	Expiry int    `boil:"expiry" json:"expiry"`
}

Jump to

Keyboard shortcuts

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