Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OneTimeCodeController ¶
type OneTimeCodeController struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *gorm.DB, config *models.Config) *OneTimeCodeController
New creates an instance of the singleCodeController controller and sets its DB handle
func (*OneTimeCodeController) GenerateSingleUseCode ¶
func (c *OneTimeCodeController) GenerateSingleUseCode(w http.ResponseWriter, r *http.Request)
GenerateSingleUseCode Create a single-usage 6 digits temporary code Useful when a user only has Webauthn MFA, which is specific to a device and browser. Without alternative MFA such as OTP, they would use this temporary code feature
to be allowed to register webauthn on another device or browser.
func (*OneTimeCodeController) ValidateSingleUseCode ¶
func (c *OneTimeCodeController) ValidateSingleUseCode(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.