@nrfcloud/api-gateway-authorizer
Advanced tools
Comparing version 1.0.0 to 1.0.1
12
index.js
@@ -100,9 +100,11 @@ 'use strict' | ||
}, | ||
context: { | ||
user: IdentityId, | ||
email: payload.email, | ||
'cognito:username': payload['cognito:username'] | ||
} | ||
context: Object.assign( | ||
{}, | ||
payload, | ||
{ | ||
cognitoIdentityId: IdentityId | ||
} | ||
) | ||
}))) | ||
.catch(callback) | ||
} |
{ | ||
"name": "@nrfcloud/api-gateway-authorizer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Custom authorizer for API Gateway", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,2 +15,13 @@ # Custom API Gateway Authorizer | ||
It fetches the Cognito Identity ID for the user pool token. | ||
The user information will be on `event.requestContext.authorizer`: | ||
```json | ||
{ | ||
cognitoIdentityId: 'us-east-1:...', | ||
'cognito:username': 'alex.doe@example.com', | ||
email: 'alex.doe@example.com' | ||
} | ||
``` | ||
## Tests | ||
@@ -17,0 +28,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
6714
100
37