@dt-esa/authorizer
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -85,6 +85,5 @@ "use strict"; | ||
// Dynatrace flow will add scopes automatically. | ||
req._authorizedScopes = req._authorizedScopes || []; | ||
req._authorizedScopes = | ||
options.authorizations | ||
? options.authorizations[req._username] | ||
: (req._authorizedScopes || []); | ||
req._authorizedScopesconcat(options.authorizations ? options.authorizations[req._username] || [] : []); | ||
next(); | ||
@@ -97,3 +96,3 @@ }); | ||
const scopeMapping = req._scopeMapping || {}; | ||
const authorizedScopes = req._authorizedScopes; | ||
const authorizedScopes = req._authorizedScopes || []; | ||
// Calculate ALL grants the request has if there is a mapping specified. | ||
@@ -100,0 +99,0 @@ const mappedScopes = Object.keys(scopeMapping).flatMap(key => { |
{ | ||
"name": "@dt-esa/authorizer", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
33703
659