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 {
|
2021-03-19 10:12:56 +00:00
|
|
|
return idp.IDPConfigID != "" && idp.ExternalUserID != ""
|
2021-01-07 15:06:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|