mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-29 10:32:15 +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:
@@ -957,9 +957,13 @@ export class AdminService {
|
||||
return this.grpcService.admin.getLockoutPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateLockoutPolicy(maxAttempts: number): Promise<UpdateLockoutPolicyResponse.AsObject> {
|
||||
public updateLockoutPolicy(
|
||||
maxPasswordAttempts: number,
|
||||
maxOTPAttempts: number,
|
||||
): Promise<UpdateLockoutPolicyResponse.AsObject> {
|
||||
const req = new UpdateLockoutPolicyRequest();
|
||||
req.setMaxPasswordAttempts(maxAttempts);
|
||||
req.setMaxPasswordAttempts(maxPasswordAttempts);
|
||||
req.setMaxOtpAttempts(maxOTPAttempts);
|
||||
|
||||
return this.grpcService.admin.updateLockoutPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
@@ -1587,9 +1587,13 @@ export class ManagementService {
|
||||
return this.grpcService.mgmt.getLockoutPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public addCustomLockoutPolicy(maxAttempts: number): Promise<AddCustomLockoutPolicyResponse.AsObject> {
|
||||
public addCustomLockoutPolicy(
|
||||
maxPasswordAttempts: number,
|
||||
maxOTPAttempts: number,
|
||||
): Promise<AddCustomLockoutPolicyResponse.AsObject> {
|
||||
const req = new AddCustomLockoutPolicyRequest();
|
||||
req.setMaxPasswordAttempts(maxAttempts);
|
||||
req.setMaxPasswordAttempts(maxPasswordAttempts);
|
||||
req.setMaxOtpAttempts(maxOTPAttempts);
|
||||
|
||||
return this.grpcService.mgmt.addCustomLockoutPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
@@ -1599,9 +1603,13 @@ export class ManagementService {
|
||||
return this.grpcService.mgmt.resetLockoutPolicyToDefault(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateCustomLockoutPolicy(maxAttempts: number): Promise<UpdateCustomLockoutPolicyResponse.AsObject> {
|
||||
public updateCustomLockoutPolicy(
|
||||
maxPasswordAttempts: number,
|
||||
maxOTPAttempts: number,
|
||||
): Promise<UpdateCustomLockoutPolicyResponse.AsObject> {
|
||||
const req = new UpdateCustomLockoutPolicyRequest();
|
||||
req.setMaxPasswordAttempts(maxAttempts);
|
||||
req.setMaxPasswordAttempts(maxPasswordAttempts);
|
||||
req.setMaxOtpAttempts(maxOTPAttempts);
|
||||
|
||||
return this.grpcService.mgmt.updateCustomLockoutPolicy(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user