Merge commit from fork

* fix: respect lockout policy on password change (with old password)

* add tarpitting

* cleanup
This commit is contained in:
Livio Spring
2025-10-29 10:07:35 +01:00
committed by GitHub
parent 72a5c33e6a
commit b8db8cdf9c
17 changed files with 619 additions and 49 deletions
+2
View File
@@ -70,6 +70,7 @@ type Commands struct {
defaultRefreshTokenLifetime time.Duration
defaultRefreshTokenIdleLifetime time.Duration
phoneCodeVerifier func(ctx context.Context, id string) (senders.CodeGenerator, error)
tarpit func(failedAttempts uint64)
multifactors domain.MultifactorConfigs
webauthnConfig *webauthn_helper.Config
@@ -214,6 +215,7 @@ func StartCommands(
repo.newHashedSecret = newHashedSecretWithDefault(secretHasher, defaultSecretGenerators.ClientSecret)
}
repo.phoneCodeVerifier = repo.phoneCodeVerifierFromConfig
repo.tarpit = defaults.Tarpit.Tarpit()
return repo, nil
}