Skip to content

Commit

Permalink
Provide a consistent userid over time to WOPI
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Oct 11, 2021
1 parent d39f89c commit 77f3e5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/wopi-consistent-userid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: pass an extra query parameter to WOPI /openinapp with a
unique and consistent over time user identifier. The Reva token used so far
is not consistent (it's per session) and also too long.

https://github.com/cs3org/reva/pull/1234
https://github.com/cs3org/wopiserver/pull/48
1 change: 1 addition & 0 deletions pkg/app/provider/wopi/wopi.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func (p *wopiProvider) GetAppURL(ctx context.Context, resource *provider.Resourc
u, ok := ctxpkg.ContextGetUser(ctx)
if ok { // else defaults to "Guest xyz"
q.Add("username", u.Username)
q.Add("userid", u.Id.OpaqueId+"@"+u.Id.Idp)
}

q.Add("appname", p.conf.AppName)
Expand Down

0 comments on commit 77f3e5e

Please sign in to comment.