@nrfcloud/api-gateway-authorizer
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -108,3 +108,10 @@ 'use strict' | ||
}))) | ||
.catch(callback) | ||
.catch(err => { | ||
// See https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output | ||
if (err && (err.name === 'TokenExpiredError' || err.name === 'JsonWebTokenError')) { | ||
return callback('Unauthorized') // eslint-disable-line standard/no-callback-literal | ||
} | ||
console.error(err) | ||
return callback(`Error: ${JSON.stringify(err)}`) // eslint-disable-line standard/no-callback-literal | ||
}) | ||
} |
{ | ||
"name": "@nrfcloud/api-gateway-authorizer", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Custom authorizer for API Gateway", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7181
107