totp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnrollmentTicket

type EnrollmentTicket struct {
	UserID     string    `json:"u"`
	Seed       string    `json:"s"`
	Expiration time.Time `json:"e"`
}

func DecodeEnrollmentTicket

func DecodeEnrollmentTicket(ticket string) (EnrollmentTicket, error)

func GenerateEnrollmentTicket

func GenerateEnrollmentTicket(userID string, seed string) EnrollmentTicket

func (*EnrollmentTicket) Encode

func (et *EnrollmentTicket) Encode() (string, error)

type LoginTicket

type LoginTicket struct {
	UserID      string    `json:"u"`
	RedirectURI string    `json:"r"`
	Expiration  time.Time `json:"e"`
}

func DecodeLoginTicket

func DecodeLoginTicket(ticket string) (LoginTicket, error)

func GenerateLoginTicket

func GenerateLoginTicket(userID, redirectURI string) LoginTicket

func (*LoginTicket) Encode

func (lt *LoginTicket) Encode() (string, error)

Jump to

Keyboard shortcuts

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