Skip to content

Commit

Permalink
New event: UserSignedIn
Browse files Browse the repository at this point in the history
  • Loading branch information
rhafer committed Aug 29, 2024
1 parent e27abd5 commit 86f39ec
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/new-user-signedin-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: New event: UserSignedIn

There is a new Event that cam be triggered when a user signs in

https://github.com/cs3org/reva/pull/4828
13 changes: 13 additions & 0 deletions pkg/events/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,16 @@ func (BackchannelLogout) Unmarshal(v []byte) (interface{}, error) {
err := json.Unmarshal(v, &e)
return e, err
}

// UserSignedIn is emitted when a user signs in
type UserSignedIn struct {
Executant *user.UserId
Timestamp *types.Timestamp
}

// Unmarshal to fulfill umarshaller interface
func (UserSignedIn) Unmarshal(v []byte) (interface{}, error) {
e := UserSignedIn{}
err := json.Unmarshal(v, &e)
return e, err
}

0 comments on commit 86f39ec

Please sign in to comment.