mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 20:08:02 +00:00
19 lines
500 B
Go
19 lines
500 B
Go
|
package management
|
||
|
|
||
|
import (
|
||
|
"github.com/caos/zitadel/internal/domain"
|
||
|
mgmt "github.com/caos/zitadel/pkg/grpc/management"
|
||
|
)
|
||
|
|
||
|
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),
|
||
|
}
|
||
|
}
|