2021-01-05 08:33:45 +00:00
|
|
|
package domain
|
|
|
|
|
2021-02-23 14:13:04 +00:00
|
|
|
import es_models "github.com/caos/zitadel/internal/eventstore/v1/models"
|
2021-01-05 08:33:45 +00:00
|
|
|
|
|
|
|
type ExternalIDP struct {
|
|
|
|
es_models.ObjectRoot
|
|
|
|
|
2021-01-07 15:06:45 +00:00
|
|
|
IDPConfigID string
|
|
|
|
ExternalUserID string
|
|
|
|
DisplayName string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (idp *ExternalIDP) IsValid() bool {
|
|
|
|
return idp.AggregateID != "" && idp.IDPConfigID != "" && idp.ExternalUserID != ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type ExternalIDPState int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
ExternalIDPStateUnspecified ExternalIDPState = iota
|
|
|
|
ExternalIDPStateActive
|
|
|
|
ExternalIDPStateRemoved
|
|
|
|
|
|
|
|
externalIDPStateCount
|
|
|
|
)
|
|
|
|
|
|
|
|
func (s ExternalIDPState) Valid() bool {
|
|
|
|
return s >= 0 && s < externalIDPStateCount
|
2021-01-05 08:33:45 +00:00
|
|
|
}
|