loginreq

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReqID

func NewReqID() string

Types

type LoginReq

type LoginReq struct {
	ID        string
	Username  string
	Expiry    time.Time
	Dur       time.Duration
	Confirmed bool
	Code      string
}

type MemDB

type MemDB struct {
	// contains filtered or unexported fields
}

func NewMemDB

func NewMemDB(maxRound uint32, dur time.Duration) *MemDB

func (*MemDB) Confirm

func (m *MemDB) Confirm(id string) (bool, string)

func (*MemDB) Finish

func (m *MemDB) Finish(id string, code string) (bool, LoginReq)

func (*MemDB) NewReq

func (m *MemDB) NewReq(username string, dur time.Duration) string

func (*MemDB) RemoveReq

func (m *MemDB) RemoveReq(id string) bool

Jump to

Keyboard shortcuts

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