recovery

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FutureLeeway = time.Minute

FutureLeeway indicates how far in the future we should allow the creation time of the token to be, in order to account for clock drift

Functions

func GenerateRecoveryToken

func GenerateRecoveryToken(ctx context.Context, wrapper wrapping.Wrapper) (string, error)

Types

type Info

type Info struct {
	Nonce        string    `json:"nonce"`
	NonceBytes   []byte    `json:"-"`
	CreationTime time.Time `json:"creation_time"`
}

Info is the struct required to be marshaled to be used as a token for the recovery workflow.

func ParseRecoveryToken

func ParseRecoveryToken(ctx context.Context, wrapper wrapping.Wrapper, versionedToken string) (*Info, error)

Jump to

Keyboard shortcuts

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