mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:17:32 +00:00
feat(saml): implementation of saml for ZITADEL v2 (#3618)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
16
internal/project/model/saml_config.go
Normal file
16
internal/project/model/saml_config.go
Normal 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 == "")
|
||||
}
|
Reference in New Issue
Block a user