controllers

package
v0.0.0-...-db47865 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OTPController

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

func New

func New(db *gorm.DB, config *models.Config) *OTPController

New creates an instance of the controller and sets its DB handle

func (*OTPController) GenerateQrCode

func (u *OTPController) GenerateQrCode(w http.ResponseWriter, r *http.Request)

GenerateQrCode creates an OTP MFA provider for the user and the OTP secret. If successful, returns the QRCode image

func (*OTPController) ValidateOTP

func (u *OTPController) ValidateOTP(w http.ResponseWriter, r *http.Request)

type OneTimePassword

type OneTimePassword struct {
	Code string
}

Jump to

Keyboard shortcuts

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