token

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACCESS_TOKEN_LENGTH  = 64
	REFRESH_TOKEN_LENGTH = 32
	MAX_GEN_TOKEN_ITER   = 1_000_000
)

Variables

This section is empty.

Functions

func GenerateSecureToken

func GenerateSecureToken(length int) string

Types

type TokenInfo

type TokenInfo struct {
	AccessToken  string
	RefreshToken string
}

func GetFreshTokens

func GetFreshTokens(db *gorm.DB) (*TokenInfo, error)

Jump to

Keyboard shortcuts

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