Comment all new code
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Melody Becker 2025-04-02 15:33:07 +02:00
parent b6f12b7acf
commit 8f8ad3035a
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
33 changed files with 166 additions and 111 deletions

View file

@ -20,6 +20,7 @@ import (
const totpUnverifiedSuffix = "-NOT_VERIFIED"
const totpTokenNoLongerRecentlyUsed = time.Second * 90
// Perform a 2nd factor totp based login
func (a *Authenticator) PerformTotpLogin(
username string,
sessionId uint64,
@ -119,6 +120,8 @@ func (a *Authenticator) PerformTotpLogin(
return LoginNextSucess, token.Token, nil
}
// Create a new totp key for a user.
// The key is marked as not verified until it is sucessfully used once
func (a *Authenticator) StartTotpRegistration(
username string,
tokenName string,