mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-21 07:17:39 +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),
|
||
|
}
|
||
|
}
|