mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 04:07:31 +00:00
feat(api): add oidc and jwt provider template (#5290)
Adds possibility to manage OIDC and JWT template based providers
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user