refreshtoken

package
v0.0.0-...-ee83092 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() string

Generate a new refresh token

Types

type InMemoryTokenOption

type InMemoryTokenOption func(c *inMemoryRefreshTokenStore)

func WithExpTime

func WithExpTime(d time.Duration) InMemoryTokenOption

type Store

type Store interface {
	Add(token, userID string)
	IsOwner(token, userID string) bool
	ExtendValidity(token string)
	Delete(token string)
	Valid(token string) bool
	ExpirationTime(token string) time.Time
}

func NewInMemoryTokenStore

func NewInMemoryTokenStore(opts ...func(s *inMemoryRefreshTokenStore)) Store

Jump to

Keyboard shortcuts

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