2021-01-04 14:52:13 +01:00
|
|
|
package domain
|
|
|
|
|
2021-01-05 09:33:45 +01:00
|
|
|
import "github.com/caos/zitadel/internal/eventstore/models"
|
|
|
|
|
|
|
|
type LoginPolicy struct {
|
|
|
|
models.ObjectRoot
|
|
|
|
|
|
|
|
Default bool
|
|
|
|
AllowUsernamePassword bool
|
|
|
|
AllowRegister bool
|
|
|
|
AllowExternalIdp bool
|
|
|
|
IDPProviders []*IDPProvider
|
|
|
|
ForceMFA bool
|
|
|
|
SecondFactors []SecondFactorType
|
|
|
|
MultiFactors []MultiFactorType
|
|
|
|
PasswordlessType PasswordlessType
|
|
|
|
}
|
|
|
|
|
|
|
|
type IDPProvider struct {
|
|
|
|
models.ObjectRoot
|
|
|
|
Type IdentityProviderType
|
|
|
|
IDPConfigID string
|
|
|
|
}
|
|
|
|
|
2021-01-04 14:52:13 +01:00
|
|
|
type PasswordlessType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
PasswordlessTypeNotAllowed PasswordlessType = iota
|
|
|
|
PasswordlessTypeAllowed
|
|
|
|
|
|
|
|
passwordlessCount
|
|
|
|
)
|
|
|
|
|
|
|
|
func (f PasswordlessType) Valid() bool {
|
|
|
|
return f >= 0 && f < passwordlessCount
|
|
|
|
}
|