2021-08-11 06:36:32 +00:00
|
|
|
package management
|
|
|
|
|
|
|
|
import (
|
2022-04-26 23:01:45 +00:00
|
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
|
|
mgmt "github.com/zitadel/zitadel/pkg/grpc/management"
|
2021-08-11 06:36:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func AddLockoutPolicyToDomain(p *mgmt.AddCustomLockoutPolicyRequest) *domain.LockoutPolicy {
|
|
|
|
return &domain.LockoutPolicy{
|
|
|
|
MaxPasswordAttempts: uint64(p.MaxPasswordAttempts),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func UpdateLockoutPolicyToDomain(p *mgmt.UpdateCustomLockoutPolicyRequest) *domain.LockoutPolicy {
|
|
|
|
return &domain.LockoutPolicy{
|
|
|
|
MaxPasswordAttempts: uint64(p.MaxPasswordAttempts),
|
|
|
|
}
|
|
|
|
}
|