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
}
Click to show internal directories.
Click to hide internal directories.