feat(api): add oidc and jwt provider template (#5290)

Adds possibility to manage OIDC and JWT template based providers
This commit is contained in:
Livio Spring
2023-02-27 16:32:18 +01:00
committed by GitHub
parent 9396e8b2f5
commit 80003939ad
29 changed files with 4338 additions and 295 deletions

View File

@@ -6,7 +6,6 @@ import (
"github.com/zitadel/zitadel/internal/errors"
"github.com/zitadel/zitadel/internal/eventstore"
"github.com/zitadel/zitadel/internal/eventstore/repository"
"github.com/zitadel/zitadel/internal/repository/idpconfig"
)
type Options struct {
@@ -63,19 +62,15 @@ type RemovedEvent struct {
eventstore.BaseEvent `json:"-"`
ID string `json:"id"`
name string
}
func NewRemovedEvent(
base *eventstore.BaseEvent,
id string,
name string,
) *RemovedEvent {
return &RemovedEvent{
BaseEvent: *base,
ID: id,
name: name,
}
}
@@ -84,10 +79,7 @@ func (e *RemovedEvent) Data() interface{} {
}
func (e *RemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint {
if e.name == "" {
return nil
}
return []*eventstore.EventUniqueConstraint{idpconfig.NewRemoveIDPConfigNameUniqueConstraint(e.name, e.Aggregate().ResourceOwner)}
return nil
}
func RemovedEventMapper(event *repository.Event) (eventstore.Event, error) {