mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-20 23:07:33 +00:00
153df2e12f
* feat: provide option to limit (T)OTP checks * fix requests in console * update errors pkg * cleanup * cleanup * improve naming of existing config
21 lines
604 B
Go
21 lines
604 B
Go
package management
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
mgmt "github.com/zitadel/zitadel/pkg/grpc/management"
|
|
)
|
|
|
|
func AddLockoutPolicyToDomain(p *mgmt.AddCustomLockoutPolicyRequest) *domain.LockoutPolicy {
|
|
return &domain.LockoutPolicy{
|
|
MaxPasswordAttempts: uint64(p.MaxPasswordAttempts),
|
|
MaxOTPAttempts: uint64(p.MaxOtpAttempts),
|
|
}
|
|
}
|
|
|
|
func UpdateLockoutPolicyToDomain(p *mgmt.UpdateCustomLockoutPolicyRequest) *domain.LockoutPolicy {
|
|
return &domain.LockoutPolicy{
|
|
MaxPasswordAttempts: uint64(p.MaxPasswordAttempts),
|
|
MaxOTPAttempts: uint64(p.MaxOtpAttempts),
|
|
}
|
|
}
|