lambda-custom-authorizer-middleware
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -46,3 +46,3 @@ 'use strict'; | ||
* localAuthorizer: { | ||
* handlerPath: '../other-project/lambda/auth', | ||
* handlerPath: '../../../../other-project/lambda/auth', // NOTE: path is relative to the package inside node_modules/ | ||
* handlerName: 'handler' | ||
@@ -49,0 +49,0 @@ * } |
{ | ||
"name": "lambda-custom-authorizer-middleware", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Adds support of custom lambda authorizers for local offline usage, e.g. with serverless-offlin", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -37,2 +37,4 @@ # AWS Lambda Local Middleware | ||
Note, it's installed not in dev deps. | ||
```sh | ||
@@ -42,5 +44,9 @@ $ yarn add lambda-custom-authorizer-middleware | ||
## Usage | ||
Due to the fact this package is meant to be used with [serverless-offline](https://github.com/dherault/serverless-offline) | ||
it relies on its environment variable `IS_OFFLINE` to switch on using local Lambda function. | ||
And as for now, it's limited to 1 kind of authorizer function per project. | ||
## API | ||
@@ -78,3 +84,3 @@ | ||
localAuthorizer: { | ||
handlerPath: '../other-project/lambda/auth', | ||
handlerPath: '../../../../other-project/lambda/auth', // NOTE: path is relative to the package inside node_modules/ | ||
handlerName: 'handler' | ||
@@ -99,3 +105,3 @@ } | ||
```sh | ||
DEBUG=lambda-custom-authorizer-middleware:* | ||
DEBUG=lambda-custom-authorizer-middleware sls offline start | ||
``` | ||
@@ -102,0 +108,0 @@ |
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
14393
134