From 600c7ca35121e142a6f56f132322549d6723de04 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Thu, 7 Oct 2021 14:55:11 +0200 Subject: [PATCH] use updated VerifyScope --- graph/pkg/middleware/auth.go | 2 +- ocis-pkg/middleware/account.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/graph/pkg/middleware/auth.go b/graph/pkg/middleware/auth.go index ed4a2ecf63..27cde835f4 100644 --- a/graph/pkg/middleware/auth.go +++ b/graph/pkg/middleware/auth.go @@ -61,7 +61,7 @@ func Auth(opts ...account.Option) func(http.Handler) http.Handler { errorcode.InvalidAuthenticationToken.Render(w, r, http.StatusUnauthorized, "invalid token") return } - if ok, err := scope.VerifyScope(ctx, tokenScope, r); err != nil || !ok { + if ok, err := scope.VerifyScope(ctx, tokenScope, r, nil, tokenManager); err != nil || !ok { opt.Logger.Error().Err(err).Msg("verifying scope failed") errorcode.InvalidAuthenticationToken.Render(w, r, http.StatusUnauthorized, "verifying scope failed") return diff --git a/ocis-pkg/middleware/account.go b/ocis-pkg/middleware/account.go index 562a9ce45e..5ee98ac7bd 100644 --- a/ocis-pkg/middleware/account.go +++ b/ocis-pkg/middleware/account.go @@ -60,7 +60,7 @@ func ExtractAccountUUID(opts ...account.Option) func(http.Handler) http.Handler opt.Logger.Error().Err(err) return } - if ok, err := scope.VerifyScope(r.Context(), tokenScope, r); err != nil || !ok { + if ok, err := scope.VerifyScope(r.Context(), tokenScope, r, nil, tokenManager); err != nil || !ok { opt.Logger.Error().Err(err).Msg("verifying scope failed") return }