mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 11:58:02 +00:00
25 lines
694 B
Go
25 lines
694 B
Go
|
package command
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/repository/sessionlogout"
|
||
|
"github.com/zitadel/zitadel/internal/telemetry/tracing"
|
||
|
)
|
||
|
|
||
|
func (c *Commands) BackChannelLogoutSent(ctx context.Context, id, oidcSessionID, instanceID string) (err error) {
|
||
|
ctx, span := tracing.NewSpan(ctx)
|
||
|
defer func() { span.EndWithError(err) }()
|
||
|
|
||
|
sessionWriteModel := NewSessionLogoutWriteModel(id, instanceID, oidcSessionID)
|
||
|
if err = c.eventstore.FilterToQueryReducer(ctx, sessionWriteModel); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return c.pushAppendAndReduce(
|
||
|
ctx,
|
||
|
sessionWriteModel,
|
||
|
sessionlogout.NewBackChannelLogoutSentEvent(ctx, sessionWriteModel.aggregate, oidcSessionID),
|
||
|
)
|
||
|
}
|