Skip to content

Commit

Permalink
use updated VerifyScope
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas committed Oct 15, 2021
1 parent d72b61f commit 0616c8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion graph/pkg/middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ocis-pkg/middleware/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 0616c8b

Please sign in to comment.