mirror of
https://github.com/zitadel/zitadel.git
synced 2025-07-15 16:28:36 +00:00

# Which Problems Are Solved This PR *partially* addresses #9450 . Specifically, it implements the resource based API for the apps. APIs for app keys ARE not part of this PR. # How the Problems Are Solved - `CreateApplication`, `PatchApplication` (update) and `RegenerateClientSecret` endpoints are now unique for all app types: API, SAML and OIDC apps. - All new endpoints have integration tests - All new endpoints are using permission checks V2 # Additional Changes - The `ListApplications` endpoint allows to do sorting (see protobuf for details) and filtering by app type (see protobuf). - SAML and OIDC update endpoint can now receive requests for partial updates # Additional Context Partially addresses #9450
46 lines
751 B
Go
46 lines
751 B
Go
package domain
|
|
|
|
import (
|
|
"github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
|
)
|
|
|
|
type SAMLApp struct {
|
|
models.ObjectRoot
|
|
|
|
AppID string
|
|
AppName string
|
|
EntityID string
|
|
Metadata []byte
|
|
MetadataURL *string
|
|
LoginVersion *LoginVersion
|
|
LoginBaseURI *string
|
|
|
|
State AppState
|
|
}
|
|
|
|
func (a *SAMLApp) GetApplicationName() string {
|
|
return a.AppName
|
|
}
|
|
|
|
func (a *SAMLApp) GetState() AppState {
|
|
return a.State
|
|
}
|
|
|
|
func (a *SAMLApp) GetMetadata() []byte {
|
|
return a.Metadata
|
|
}
|
|
|
|
func (a *SAMLApp) GetMetadataURL() string {
|
|
if a.MetadataURL != nil {
|
|
return *a.MetadataURL
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (a *SAMLApp) IsValid() bool {
|
|
if (a.MetadataURL == nil || *a.MetadataURL == "") && a.Metadata == nil {
|
|
return false
|
|
}
|
|
return true
|
|
}
|