feat(saml): implementation of saml for ZITADEL v2 (#3618)

This commit is contained in:
Stefan Benz
2022-09-12 17:18:08 +01:00
committed by GitHub
parent 01a92ba5d9
commit 7a5f7f82cf
134 changed files with 5570 additions and 1293 deletions

View File

@@ -13,6 +13,7 @@ type Application struct {
Type AppType
OIDCConfig *OIDCConfig
APIConfig *APIConfig
SAMLConfig *SAMLConfig
}
type AppState int32
@@ -45,5 +46,8 @@ func (a *Application) IsValid(includeConfig bool) bool {
if a.Type == AppTypeAPI && !a.APIConfig.IsValid() {
return false
}
if a.Type == AppTypeSAML && !a.SAMLConfig.IsValid() {
return false
}
return true
}

View File

@@ -0,0 +1,16 @@
package model
import (
es_models "github.com/zitadel/zitadel/internal/eventstore/v1/models"
)
type SAMLConfig struct {
es_models.ObjectRoot
AppID string
Metadata []byte
MetadataURL string
}
func (c *SAMLConfig) IsValid() bool {
return !(c.Metadata == nil && c.MetadataURL == "")
}