From 9ae8f48a54a9a790cd13424634ae79520cd552b6 Mon Sep 17 00:00:00 2001 From: Roman Perekhod Date: Mon, 24 Jun 2024 09:30:24 +0200 Subject: [PATCH] Add the backchannel logout event --- changelog/unreleased/add-backchannel-event.md | 6 ++++++ pkg/events/users.go | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 changelog/unreleased/add-backchannel-event.md diff --git a/changelog/unreleased/add-backchannel-event.md b/changelog/unreleased/add-backchannel-event.md new file mode 100644 index 0000000000..74aed17b4c --- /dev/null +++ b/changelog/unreleased/add-backchannel-event.md @@ -0,0 +1,6 @@ +Enhancement: Add the backchannel logout event + +We've added the backchannel logout event + +https://github.com/cs3org/reva/pull/4737 +https://github.com/owncloud/ocis/issues/9355 diff --git a/pkg/events/users.go b/pkg/events/users.go index 1a118b7199..2570c18ca3 100644 --- a/pkg/events/users.go +++ b/pkg/events/users.go @@ -88,3 +88,17 @@ func (PersonalDataExtracted) Unmarshal(v []byte) (interface{}, error) { err := json.Unmarshal(v, &e) return e, err } + +// BackchannelLogout is emitted when the callback revived from the identity provider +type BackchannelLogout struct { + Executant *user.UserId + SessionId string + Timestamp *types.Timestamp +} + +// Unmarshal to fulfill umarshaller interface +func (BackchannelLogout) Unmarshal(v []byte) (interface{}, error) { + e := BackchannelLogout{} + err := json.Unmarshal(v, &e) + return e, err +}