Socket
Socket
Sign inDemoInstall

aws-apigw-authorizer

Package Overview
Dependencies
48
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.9 to 0.1.10

8

lib/authorizer.js

@@ -92,3 +92,3 @@ "use strict";

exports.ApiGatewayAuthorizer = ApiGatewayAuthorizer;
function defaultBuildPolicy(event, principalId, _decodedToken) {
function defaultBuildPolicy(event, principal, _decodedToken) {
// this function must generate a policy that is associated with the recognized principal user identifier.

@@ -122,9 +122,9 @@ // depending on your use case, you might store policies in a DB, or generate them on the fly

// otherwise it would be denied
const policy = new awsPolicyLib.AuthPolicy(principalId, awsAccountId, apiOptions);
const policy = new awsPolicyLib.AuthPolicy(principal, awsAccountId, apiOptions);
policy.allowMethodWithConditions(awsPolicyLib.AuthPolicy.HttpVerb.ALL, '/*', conditions);
return policy.build();
}
function defaultBuildContext(_event, principalId, _decodedToken) {
return { principalId };
function defaultBuildContext(_event, principal, _decodedToken) {
return { principal };
}
//# sourceMappingURL=authorizer.js.map
{
"name": "aws-apigw-authorizer",
"version": "0.1.9",
"version": "0.1.10",
"description": "AWS Lambda Authorizer for API Gateway",

@@ -5,0 +5,0 @@ "main": "lib/authorizer.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc