{"_id":"aws-api-auth-policy","_rev":"2-4ee9cbd4a5784dbb0f17ab8fc49259db","name":"aws-api-auth-policy","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"aws-api-auth-policy","version":"1.0.0","description":"Typescript implementation of AWS API Gateway Lambda Authorizer policy creator","main":"dist/auth-policy","typings":"dist/auth-policy","scripts":{"prepublishOnly":"npm run compile","compile":"npm run clean && tsc -p .","watch":"tsc -w -p .","clean":"rm -rf dist"},"repository":{"type":"git","url":"git+https://github.com/chesterm8/aws-api-auth-policy.git"},"keywords":["aws","api","typescript"],"devDependencies":{"@types/node":"12.6.9","typescript":"3.5.3"},"author":{"name":"Stephen Bellchester","email":"chesterm8.dev@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/chesterm8/aws-api-auth-policy/issues"},"homepage":"https://github.com/chesterm8/aws-api-auth-policy#readme","gitHead":"bd8de3cf1c00a58e8f62e71113f73de3926a6420","_id":"aws-api-auth-policy@1.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-30/Rx50zExADjY8tjkENFEQO5rGGHFoZPgYS+p/buLO1S0rz4rupHm05U4il37NvQqkW1n+anx5WmAzIL4z92Q==","shasum":"3fd6c8c392319c3d49c53644255db956c84267d4","tarball":"https://registry.npmjs.org/aws-api-auth-policy/-/aws-api-auth-policy-1.0.0.tgz","fileCount":5,"unpackedSize":22915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQ9IRCRA9TVsSAnZWagAAHI4P/j8V4WcC56WqabRvef17\n0XVN8r/Ly/bLF3HPLZyEVdDz2X/NULQa7FOLBkXq+FelAjCt8iZs5zyNckoG\nEAXxBMgG/F5G/b3QHfJrl8kpPP9+fkyWlTWE4CsCconKiP0uo3djSHTt5ZgK\nlhdH3v7Iwy9GUojgHckA/fFlAdYfOCOAdJsH8+qqwY11o6QzKXXsHWOUuiC/\nnGTrPA05LMiQjEjjjcDBPVZulO2lTkAkOUR6sY2U/L4ilQBVqQshPO1Um4cA\n2qL5rzBzXu+iWKBInbYhNBPUt9EJgsPdKuWhdsYeVPd2wwohzINmBoiYhSgP\nyo9Xgn3j8mi8OyR/v0Rb5wVTOQYtMKOlZgoN0JPfLYnsL4rBHP8Lm+U7Qa7P\nPf00j1iEqN/FSCB7BYjWy7anp5lOxHqOZJBsIYBb7lz+X8KN7lCSH+CnK+kW\ngDOXuXGX8zXSR+X2wIxCbw/47Y7Lcx/ZfTc+unLmcY8ktaY5kmPmxTyg6mvR\n94TrQE4LINHXWiGROHJg94k863dH9aCa8G+LHZZPiAP7+6oscJcIgSafaEJS\nPjTGPHjgl/ecpQkk8yKtEndIB97AZL3ezpL7CNxXiAnNsdaVkR9hV8AGnTJQ\nZidR2oNpul2co+nCPC/ubRaVs91OTUhIwV8602VvDotO2f+rP992onKho7jt\nLikS\r\n=cHg9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC54dhDySzzh5OGu4cUCZRdabqC0mMJIm/UIrgqt8iS5AiBdlKuL3XuwK5leLml/FG9t+7boj69CQfYcozJLXFvU8Q=="}]},"maintainers":[{"name":"chesterm8","email":"chesterm8.dev@gmail.com"}],"_npmUser":{"name":"chesterm8","email":"chesterm8.dev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aws-api-auth-policy_1.0.0_1564725776612_0.28392200674442214"},"_hasShrinkwrap":false},"1.0.1":{"name":"aws-api-auth-policy","version":"1.0.1","description":"Typescript implementation of AWS API Gateway Lambda Authorizer policy creator","main":"dist/auth-policy","typings":"dist/auth-policy","scripts":{"prepublishOnly":"npm run compile","compile":"npm run clean && tsc -p .","watch":"tsc -w -p .","clean":"rm -rf dist"},"repository":{"type":"git","url":"git+https://github.com/chesterm8/aws-api-auth-policy.git"},"keywords":["aws","api","typescript"],"devDependencies":{"@types/node":"12.6.9","typescript":"3.5.3"},"author":{"name":"Stephen Bellchester","email":"chesterm8.dev@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/chesterm8/aws-api-auth-policy/issues"},"homepage":"https://github.com/chesterm8/aws-api-auth-policy#readme","gitHead":"01cd983d5c618c8b868c744fb144edec7c510ce3","_id":"aws-api-auth-policy@1.0.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vJaiVfsmT3ao7KE3wkHV/AqnLAvmEYjbf0ZT28G9kjbGANl/ByRogwT8ObAswvR9T70Mm/STPmshhTGi5WDilQ==","shasum":"7d56d5ff338c639034d9d685d670b32ee1775f72","tarball":"https://registry.npmjs.org/aws-api-auth-policy/-/aws-api-auth-policy-1.0.1.tgz","fileCount":5,"unpackedSize":22943,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQ9TXCRA9TVsSAnZWagAAKh4P/0G2xco0EbI/YliV07lh\nbo6qADDrbrqjZUotIOjttPumj7G2hoHAof/s/Jjtl0yuI3P52qaD6p3gODEV\nLUgXcvSjviqw+a2+mVV6rsDvUhvGyO6c+0fo6NMh0eQCUqzE7LF6yOt+0KjM\ndedWE9zqppliz/aSqfaguwHhLp7GQH0dM/T2w2vgoMGJ4TvP93+1+PX2RiCZ\nUPeDeIwXzRAB7J9fx4TdE4YVJTOiw+95ViHaw1HVkhRaEOZ4W6vSmizIWNt5\nSkAGCjDVbeNLmSpSSwtNa1irVvPvfwFJ71fGSYZWWTLFEqKMcFcgiU6ziyE+\nkpBcu1s/dUHLWx30zMCfLlSX16/qOkTCtX+HNpHToyNE2InVF4Rbi2lroDI+\nezsDnJjtWCvWGUBfNElw84jWrc+sCVeY2JCk2e0NpdjoEnV13HTerOQwfB2/\n/KkvpLgA+bkr/9Dpp20mLWTzm2gzl+5GJWXEw7wJhBuPqw55seuixvJ7lfma\ngAOcl2jZk0zMpupBxe1Zzb09MIwP1p0xCJdVaJviiAanaeFx/wAjrCXAPO2o\nt2GyKKqomZWGwAatascRB3Szw0q9wF6kJgeV8fGvwNzkjJ4GfiXEADdKIzaF\n4pRd6UFk1h3eqZLkW9wB0XPj2JvLegsdaR/do+xKAGeoSj0pRaISiz4Eo/G6\nv9OQ\r\n=YSr7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDyrtUJg4LVwY6w1ytos8QjH59UNFDC54mBvLTT66ETrAiBmjh3PxVK4HSIxGMs3zzZfnV8KzRFxof2xzkGkLT5Zvg=="}]},"maintainers":[{"name":"chesterm8","email":"chesterm8.dev@gmail.com"}],"_npmUser":{"name":"chesterm8","email":"chesterm8.dev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aws-api-auth-policy_1.0.1_1564726486484_0.6701124948719102"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-02T06:02:56.612Z","1.0.0":"2019-08-02T06:02:56.766Z","modified":"2022-04-11T16:17:34.220Z","1.0.1":"2019-08-02T06:14:46.588Z"},"maintainers":[{"name":"chesterm8","email":"chesterm8.dev@gmail.com"}],"description":"Typescript implementation of AWS API Gateway Lambda Authorizer policy creator","homepage":"https://github.com/chesterm8/aws-api-auth-policy#readme","keywords":["aws","api","typescript"],"repository":{"type":"git","url":"git+https://github.com/chesterm8/aws-api-auth-policy.git"},"author":{"name":"Stephen Bellchester","email":"chesterm8.dev@gmail.com"},"bugs":{"url":"https://github.com/chesterm8/aws-api-auth-policy/issues"},"license":"MIT","readme":"# aws-api-auth-policy\nTypescript implementation of AWS API Gateway Lambda Authorizer policy creator\n\n## Install\n\n```sh\n$ npm install aws-api-auth-policy\n```\n\n## Input\n\n```ts\nimport {ApiOptions, AuthPolicy} from \"aws-api-auth-policy\";\n\nconst userId = \"12345\";\nconst awsAccountId = \"6789\";\n\nconst apiOptions: ApiOptions = {};\napiOptions.region = \"us-east-1\";\napiOptions.restApiId = \"restApiId\";\napiOptions.stage = \"stage\";\n\nvar authPolicy = new AuthPolicy(userId, awsAccountId, apiOptions);\nauthPolicy.allowAllMethods();\nvar generated = authPolicy.build();\n\nvar policyJson = JSON.stringify(generated);\nconsole.log(policyJson);\n```\n\n## Output\n\n```json\n{\n  \"principalId\": \"12345\",\n  \"policyDocument\": {\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n      {\n        \"Action\": \"execute-api:Invoke\",\n        \"Effect\": \"Allow\",\n        \"Resource\": [\n          \"arn:aws:execute-api:us-east-1:6789:restApiId/stage/*/*\"\n        ]\n      }\n    ]\n  }\n}\n```\n","readmeFilename":"README.md"}