This commit is contained in:
parent
b6f12b7acf
commit
8f8ad3035a
33 changed files with 166 additions and 111 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue