{"_id":"@adneovrebo/api-gateway-apikey-query-authorizer","_rev":"2-f9f9c9d4c4f47ea66f83ffbd7ffc4989","name":"@adneovrebo/api-gateway-apikey-query-authorizer","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@adneovrebo/api-gateway-apikey-query-authorizer","version":"1.0.0","description":"A package to authorize AWS Gateway API with API-key as query parameter.","main":"./lib/index.js","types":"./lib/index.d.ts","homepage":"https://github.com/adneovrebo/aws-api-gateway-apikey-query","scripts":{"build":"tsc src/index.ts --outDir lib --declaration","publish":"npm publish --access public"},"bugs":{"url":"https://github.com/adneovrebo/aws-api-gateway-apikey-query/issues"},"author":{"name":"Ådne Øvrebø","email":"adne.ovrebo@hotmail.com","url":"https://github.com/adneovrebo"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/adneovrebo/aws-api-gateway-apikey-query.git"},"directories":{"lib":"lib"},"_id":"@adneovrebo/api-gateway-apikey-query-authorizer@1.0.0","_nodeVersion":"12.21.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-2/M6zA/4MbiBXFWRfTU3OeA1SPOpbPmq95DovVwA5HlIJ7IPwvzEvyc6zavPnxvwbtKVKDP9dyySL9eqndBuDA==","shasum":"0514dad8b1c318ffe9d682f6c04659885a279d31","tarball":"https://registry.npmjs.org/@adneovrebo/api-gateway-apikey-query-authorizer/-/api-gateway-apikey-query-authorizer-1.0.0.tgz","fileCount":6,"unpackedSize":9748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAPxECRA9TVsSAnZWagAAWGsQAKRFsF1Y9sLZ+715KUlw\nQsH2OxwnKWWzH4TnAgCT5jG2e6zaaTGWm1etvGxKZK2PRlDB/LS4TwOdkTBy\nWaOsycE+Ouj13AWmWi9qfgdygyDwW/4IpgoivG9P6VRUH/nBUeRecYGX3Q/s\nwKFLidioQ6ItQig8ifitQUqXUfnR7Szcz6n5rOZSnCCLBcyphJfFH7VUybUs\njzv0G6aBiIAAkJiOJy5dcbt4l05FYplTGJjvMGdSei5bJeMQsrPSzE8r41wC\nfyb49VH4N+9FCWXR5sdgmsY9L8ag/1+D2iUdR9uSFBUNryyrPfX/YdhvnvIP\ni4KWCUrFCp2eNFueY6YVp8aLdpUZll5KAmwm5J612kesUp/xGR/tvdDXc52p\nMt4Uxv3f025QmlwXOuHiHcHqT0pluoFMIyq0E1b4QzAb9DYCuzQm2urMSZrk\nMPQaDRtEvgNklqAE/Nk4Pht0l69ktMW0BXoIuytSL14aPpcSYS+RsDBYgVQ+\n8gStCq+puJmdEAzE9TPi59p2LaO/B9MVvwll0TT0OdrsHsIRNEXarDszejzr\nZKeQWatUyPGssEwWGDs5YGBvBvnpwMYCw9yXyfHroIWNVBUKQo6mBpVK80XB\n95bi26EfoL+C/LAo8GSEBPb4GZVUieaP/ucGDmn+9Cm5FOhfUU8kMHLMbZF7\n/oIV\r\n=FvD0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFywAkO1CSdMhJJ2qBoZQjmJKPJ8YHUq0G7LmNQa30dkAiAao3BrwfI5Qw06scGP2YaB9KLe0kWezvIXtb/psPENPw=="}]},"_npmUser":{"name":"adneovrebo","email":"adne.ovrebo@hotmail.com"},"maintainers":[{"name":"adneovrebo","email":"adne.ovrebo@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api-gateway-apikey-query-authorizer_1.0.0_1627454532452_0.21552214251394286"},"_hasShrinkwrap":false},"1.0.1":{"name":"@adneovrebo/api-gateway-apikey-query-authorizer","version":"1.0.1","description":"A package to authorize AWS Gateway API with API-key as query parameter.","main":"./lib/index.js","types":"./lib/index.d.ts","homepage":"https://github.com/adneovrebo/aws-api-gateway-apikey-query","scripts":{"build":"tsc src/index.ts --outDir lib --declaration","publish":"npm publish --access public"},"bugs":{"url":"https://github.com/adneovrebo/aws-api-gateway-apikey-query/issues"},"author":{"name":"Ådne Øvrebø","email":"adne.ovrebo@hotmail.com","url":"https://github.com/adneovrebo"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/adneovrebo/aws-api-gateway-apikey-query.git"},"directories":{"lib":"lib"},"_id":"@adneovrebo/api-gateway-apikey-query-authorizer@1.0.1","_nodeVersion":"12.21.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-NhJ4rnnUjUHKRXSsLGekJPGPslyEOoCW5p99eeBF8zjDUtCxIuXq9cy9M75xScz9KMRA5qMxj88xKBqyhSwMuw==","shasum":"6fcd3c6a76d7b245a522143e41361101c53663be","tarball":"https://registry.npmjs.org/@adneovrebo/api-gateway-apikey-query-authorizer/-/api-gateway-apikey-query-authorizer-1.0.1.tgz","fileCount":8,"unpackedSize":155794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAQLLCRA9TVsSAnZWagAAd+UP/Rph+yPegXv2yozIyPpt\n4sZ/3M6wm90VfLONSNU9JgcTzWbL6WKUUvmGhyCZKHWl1K93YevYpWaXGvIO\nJwVTDwPX/IdTWNCbc/B/BFHUq55Dfej4mV/p+qAv2RSDZ6cdfcdwTnbD/L/e\nkpsH9owsh/KHjwZI7q9segVdWqA+QaVxA91D7je82n/xUY2vGZDvI4Sv/qDP\npyx8PT8vosU/pLgZXCkf7jLkjEIXaOn0Fn9fFWO0tOIFE7vS/xDpILmdxjXi\n5k2M0x2JNBFn49xXns5ffG14D9bfiCKF/Y6S0IkoVSlDMiT19UDTY5pXae2P\nDp+a4xotZzRsFaHHfY//jfvP9jwnyvEedztLVrIa1V976XQtWBzWgb3TWD2+\n6RfIWsUi1zfNcj+jS9O+5dZ4CLzz7645ub7DnY2DdnP014ADFthJG1xymuyq\nL3LYHmgKnACMyBecN4jL9f+C3/zJ1spuz84zfsgV4YfFmxsZXl3b8YQP2Lyz\nU1SPalBGnLizqbbUUjQrTb/sJFiix2I0pcBOdcJjNErRpvydDnPZkq4Y9OJd\n8A9M9d+KtzhZYUN7MQDEjAMHXOqv88fA6ydKSR8kD5sY2dHKp8caIfwH+095\n0i7WdaYgA/War12kiF7BouQckJAHOqCan85B+bdYwwywNnSUxzSp8kcZvN9Z\nr0h2\r\n=KLg3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtJ12e39LjuhO+X5gX5BiUM85/N79AlMBP40spyMjbXgIgO3uLnTWHK3qxZOBVDGud5cGz/Ph/4ULCJBnM4aJtkg4="}]},"_npmUser":{"name":"adneovrebo","email":"adne.ovrebo@hotmail.com"},"maintainers":[{"name":"adneovrebo","email":"adne.ovrebo@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/api-gateway-apikey-query-authorizer_1.0.1_1627456202611_0.6621033612040541"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-28T06:42:12.399Z","1.0.0":"2021-07-28T06:42:12.601Z","modified":"2022-04-04T11:33:54.358Z","1.0.1":"2021-07-28T07:10:03.028Z"},"maintainers":[{"name":"adneovrebo","email":"adne.ovrebo@hotmail.com"}],"description":"A package to authorize AWS Gateway API with API-key as query parameter.","homepage":"https://github.com/adneovrebo/aws-api-gateway-apikey-query","repository":{"type":"git","url":"git+https://github.com/adneovrebo/aws-api-gateway-apikey-query.git"},"author":{"name":"Ådne Øvrebø","email":"adne.ovrebo@hotmail.com","url":"https://github.com/adneovrebo"},"bugs":{"url":"https://github.com/adneovrebo/aws-api-gateway-apikey-query/issues"},"license":"MIT","readme":"# AWS API-Gateway API-key query\n\nFunction for allowing to pass API-Gateway generated api-keys as queryparameter. Allows for some edge-case usage. \n\nThis allows for the following usage with AWS API-key managing:\n```\nhttps://some-url/prod/transaction?apikey=some-api-key\n```\n\n## Lambda setup\n```bash\n# Install dependency in lambda function\nnpm i @adneovrebo/api-gateway-apikey-query-authorizer\n```\n\n```typescript\n// In your authorizer lambda function add the following\nimport apiKeyQueryAuthorizer from '@adneovrebo/api-gateway-apikey-query-authorizer';\n\nexports.handler = apiKeyQueryAuthorizer;\n```\n\n```bash\n# ZIP content and deploy lambda function with aws-cli (or any other way you like)\nzip -r authorizer.zip . && aws lambda update-function-code --function-name <FunctionName> --zip-file fileb://authorizer.zip\n```\n\n## Configure API-gateway\n\n1. Create authorizer with the deployed lambda function\n![Create Authorizer](images/create-authorizer.png?raw=true \"Create Authorizer\")\n\n2. Go to settings and select ``API Key Source`` to be ``AUTHORIZER``\n\n3. On the selected request select the authorizer and set ```API Key Required``` to ```true```\n![Create Authorizer](images/set-authorizer-on-method.png?raw=true \"Create Authorizer\")\n\n4. Deploy API for changes to take effect.\n\n5. Create usage plans and API keys to the desired API. \n\nHappy coding 🎉","readmeFilename":"README.md"}