mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:07:36 +00:00
feat: provide option to limit (T)OTP checks (#7693)
* feat: provide option to limit (T)OTP checks * fix requests in console * update errors pkg * cleanup * cleanup * improve naming of existing config
This commit is contained in:
@@ -55,11 +55,15 @@ func (wm *OrgLockoutPolicyWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
func (wm *OrgLockoutPolicyWriteModel) NewChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
maxAttempts uint64,
|
||||
maxPasswordAttempts,
|
||||
maxOTPAttempts uint64,
|
||||
showLockoutFailure bool) (*org.LockoutPolicyChangedEvent, bool) {
|
||||
changes := make([]policy.LockoutPolicyChanges, 0)
|
||||
if wm.MaxPasswordAttempts != maxAttempts {
|
||||
changes = append(changes, policy.ChangeMaxAttempts(maxAttempts))
|
||||
if wm.MaxPasswordAttempts != maxPasswordAttempts {
|
||||
changes = append(changes, policy.ChangeMaxPasswordAttempts(maxPasswordAttempts))
|
||||
}
|
||||
if wm.MaxOTPAttempts != maxOTPAttempts {
|
||||
changes = append(changes, policy.ChangeMaxOTPAttempts(maxOTPAttempts))
|
||||
}
|
||||
if wm.ShowLockOutFailures != showLockoutFailure {
|
||||
changes = append(changes, policy.ChangeShowLockOutFailures(showLockoutFailure))
|
||||
|
Reference in New Issue
Block a user