fediverse

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OTPRegistration

type OTPRegistration struct {
	Timestamp       time.Time
	UserID          string
	UserDisplayName string
	Code            string
	Account         string
}

OTPRegistration represents a single OTP request.

func RegisterFediverseOTP

func RegisterFediverseOTP(accessToken, userID, userDisplayName, account string) (OTPRegistration, bool, error)

RegisterFediverseOTP will start the OTP flow for a user, creating a new code and returning it to be sent to a destination.

func ValidateFediverseOTP

func ValidateFediverseOTP(accessToken, code string) (bool, *OTPRegistration)

ValidateFediverseOTP will verify a OTP code for a auth request.

Jump to

Keyboard shortcuts

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