otp

package
v0.0.0-...-d422e51 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitiateData

type InitiateData struct {
	Expiry            time.Duration `json:"expiry,omitempty"`
	Attempts          int           `json:"attempts,omitempty"`
	MaxAttempts       int           `json:"max_attempts,omitempty"`
	AttemptsResetTime time.Time     `json:"attempts_reset_time,omitempty"`
}

type OTPData

type OTPData struct {
	Nonce string
	OTP   string
}

type Repository

type Repository interface {
	Get(ctx context.Context, oidcIssuer, oidcSubject string) (payload []byte, expiry time.Time, errUC *types.CommonError)
	Set(ctx context.Context, oidcIssuer, oidcSubject string, payload []byte, expiry time.Time) (errUC *types.CommonError)
	Expire(ctx context.Context, oidcIssuer, oidcSubject string) (errUC *types.CommonError)
}

Repository for One Time Password State

type VerifyResponse

type VerifyResponse struct {
	Verified bool `json:"verified"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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