From 45fe331ad73d5ceff42c8e34a06e4858077536b1 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Thu, 21 Oct 2021 10:16:58 +0200 Subject: [PATCH] remove deprecated context key --- ocis-pkg/middleware/account.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ocis-pkg/middleware/account.go b/ocis-pkg/middleware/account.go index 2459a167a..ca25c33e2 100644 --- a/ocis-pkg/middleware/account.go +++ b/ocis-pkg/middleware/account.go @@ -1,7 +1,6 @@ package middleware import ( - "context" "encoding/json" "net/http" @@ -30,10 +29,6 @@ const AccountID string = "Account-Id" // RoleIDs serves as key for the roles in the context const RoleIDs string = "Role-Ids" -// UUIDKey serves as key for the account uuid in the context -// Deprecated: UUIDKey exists for compatibility reasons. Use AccountID instead. -var UUIDKey struct{} - // ExtractAccountUUID provides a middleware to extract the account uuid from the x-access-token header value // and write it to the context. If there is no x-access-token the middleware is omitted. func ExtractAccountUUID(opts ...account.Option) func(http.Handler) http.Handler { @@ -70,7 +65,6 @@ func ExtractAccountUUID(opts ...account.Option) func(http.Handler) http.Handler // 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(ctx, UUIDKey, u.Id.OpaqueId) // TODO: implement token manager in cs3org/reva that uses generic metadata instead of access token from header. ctx = metadata.Set(ctx, AccountID, u.Id.OpaqueId) if u.Opaque != nil {