mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-25 16:52:17 +00:00
# Which Problems Are Solved This PR implements the endpoints listed in https://github.com/zitadel/zitadel/issues/10444 . # How the Problems Are Solved The implementation follows the same pattern as the Instance one. The `Add` and `Remove` are implementing the `Commander` interface, while `List` Domains endpoints are implementing the `Querier` interace. The PR adds also some forgotten calls to the relational logic for the Instance API. The commits are identifiable by the label `instance:` prepended to them. This is the complete list: bafce01b0 , 6fe7257ab , e27bc9c34 , 8133ede73 , fde667953 , a3e1135ed , ee1a6f9c1 # Additional Context - Closes #10444 --------- Co-authored-by: Elio Bischof <[email protected]> Co-authored-by: Lebogang Phoshoko <[email protected]> Co-authored-by: Wim Van Laer <[email protected]> Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Gayathri Vijayan <[email protected]>
67 lines
1.7 KiB
Go
67 lines
1.7 KiB
Go
package domain
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
)
|
|
|
|
// TODO(IAM-Marco): Finish implementation
|
|
type OIDCConfigurationUpdate struct {
|
|
instanceDomainName string
|
|
projectID string
|
|
consoleAppID string
|
|
|
|
// oidcConfigChanges []OIDConfigChange
|
|
// appID string
|
|
}
|
|
|
|
// RequiresTransaction implements [Transactional].
|
|
func (o *OIDCConfigurationUpdate) RequiresTransaction() {}
|
|
|
|
func NewOIDCConfigurationUpdate(instanceDomainName, projectID, consoleAppID string) *OIDCConfigurationUpdate {
|
|
return &OIDCConfigurationUpdate{
|
|
instanceDomainName: instanceDomainName,
|
|
projectID: projectID,
|
|
consoleAppID: consoleAppID,
|
|
}
|
|
}
|
|
|
|
// Events implements [Commander].
|
|
func (o *OIDCConfigurationUpdate) Events(ctx context.Context, opts *InvokeOpts) ([]eventstore.Command, error) {
|
|
// oidcConfigChangedEvent, err := project.NewOIDCConfigChangedEvent(
|
|
// ctx,
|
|
// &project.NewAggregate(o.appID, o.projectID).Aggregate,
|
|
// o.appID,
|
|
// changes,
|
|
// o.oidcConfigChanges,
|
|
// )
|
|
// if err != nil {
|
|
// return nil, err
|
|
// }
|
|
// return []eventstore.Command{
|
|
// oidcConfigChangedEvent,
|
|
// }, nil
|
|
return nil, nil
|
|
}
|
|
|
|
// Execute implements [Commander].
|
|
func (o *OIDCConfigurationUpdate) Execute(ctx context.Context, opts *InvokeOpts) (err error) {
|
|
return nil
|
|
}
|
|
|
|
// String implements [Commander].
|
|
func (o *OIDCConfigurationUpdate) String() string {
|
|
return "OIDCConfigurationUpdate"
|
|
}
|
|
|
|
// Validate implements [Commander].
|
|
func (o *OIDCConfigurationUpdate) Validate(ctx context.Context, opts *InvokeOpts) (err error) {
|
|
return nil
|
|
}
|
|
|
|
var (
|
|
_ (Commander) = (*OIDCConfigurationUpdate)(nil)
|
|
_ (Transactional) = (*OIDCConfigurationUpdate)(nil)
|
|
)
|