{"action":"created","issue":{"url":"https://api.github.com/repos/dherault/serverless-offline/issues/138","repository_url":"https://api.github.com/repos/dherault/serverless-offline","labels_url":"https://api.github.com/repos/dherault/serverless-offline/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/dherault/serverless-offline/issues/138/comments","events_url":"https://api.github.com/repos/dherault/serverless-offline/issues/138/events","html_url":"https://github.com/dherault/serverless-offline/pull/138","id":185539537,"number":138,"title":"Simple Token Authentication","user":{"login":"ansraliant","id":7121475,"avatar_url":"https://avatars.githubusercontent.com/u/7121475?v=3","gravatar_id":"","url":"https://api.github.com/users/ansraliant","html_url":"https://github.com/ansraliant","followers_url":"https://api.github.com/users/ansraliant/followers","following_url":"https://api.github.com/users/ansraliant/following{/other_user}","gists_url":"https://api.github.com/users/ansraliant/gists{/gist_id}","starred_url":"https://api.github.com/users/ansraliant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansraliant/subscriptions","organizations_url":"https://api.github.com/users/ansraliant/orgs","repos_url":"https://api.github.com/users/ansraliant/repos","events_url":"https://api.github.com/users/ansraliant/events{/privacy}","received_events_url":"https://api.github.com/users/ansraliant/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-26T23:47:58Z","updated_at":"2016-11-03T11:00:12Z","closed_at":"2016-11-02T22:25:22Z","pull_request":{"url":"https://api.github.com/repos/dherault/serverless-offline/pulls/138","html_url":"https://github.com/dherault/serverless-offline/pull/138","diff_url":"https://github.com/dherault/serverless-offline/pull/138.diff","patch_url":"https://github.com/dherault/serverless-offline/pull/138.patch"},"body":"I've seen there was support for custom authenticators but not for simple API Keys. So I added the support for API Keys. \n\nThe PR is quite simple, it looks for the \"apikeys\" property in the serverless.yml and for each key defined it generates a token just like a real deployment with serverless would do. It's described [here](https://serverless.com/framework/docs/providers/aws/events/apigateway/#setting-api-keys-for-your-rest-api).\n\nWhen a route that has the property \"private\" it takes the `x-api-key` property from the header and searches the matching token.\n\nI added a section on the documentation too.\n\nFeel free to comment and let me know what you think about it.\n"},"comment":{"url":"https://api.github.com/repos/dherault/serverless-offline/issues/comments/258113626","html_url":"https://github.com/dherault/serverless-offline/pull/138#issuecomment-258113626","issue_url":"https://api.github.com/repos/dherault/serverless-offline/issues/138","id":258113626,"user":{"login":"dherault","id":4154003,"avatar_url":"https://avatars.githubusercontent.com/u/4154003?v=3","gravatar_id":"","url":"https://api.github.com/users/dherault","html_url":"https://github.com/dherault","followers_url":"https://api.github.com/users/dherault/followers","following_url":"https://api.github.com/users/dherault/following{/other_user}","gists_url":"https://api.github.com/users/dherault/gists{/gist_id}","starred_url":"https://api.github.com/users/dherault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dherault/subscriptions","organizations_url":"https://api.github.com/users/dherault/orgs","repos_url":"https://api.github.com/users/dherault/repos","events_url":"https://api.github.com/users/dherault/events{/privacy}","received_events_url":"https://api.github.com/users/dherault/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T11:00:12Z","updated_at":"2016-11-03T11:00:12Z","body":"v3.3.0! Thanks @ansraliant and @leonardoalifraco!"}}
{"actor":{"display_login":"dherault"}}