From 1403563be94247f827d4c8b66285e8fecbe13230 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 27 May 2020 10:37:37 +0200 Subject: [PATCH] Add ocis-proxy reference and comment, explaining that opaqueId = account uuid --- middleware/account.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/middleware/account.go b/middleware/account.go index 5d3380031f..4617f23f4c 100644 --- a/middleware/account.go +++ b/middleware/account.go @@ -46,6 +46,8 @@ func ExtractAccountUUID(opts ...account.Option) func(http.Handler) http.Handler return } + // Important: user.Id.OpaqueId is the AccountUUID. Set this way in the account uuid middleware in ocis-proxy. + // https://github.com/owncloud/ocis-proxy/blob/ea254d6036592cf9469d757d1295e0c4309d1e63/pkg/middleware/account_uuid.go#L109 ctx := context.WithValue(r.Context(), UUIDKey, user.Id.OpaqueId) next.ServeHTTP(w, r.WithContext(ctx)) })