use updated VerifyScope

This commit is contained in:
David Christofas
2021-10-07 14:55:11 +02:00
parent fb0380820c
commit 600c7ca351
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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
}