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