{"action":"closed","number":195,"pull_request":{"url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls/195","id":222673481,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNjczNDgx","html_url":"https://github.com/fga-eps-mds/2018.2-iFood/pull/195","diff_url":"https://github.com/fga-eps-mds/2018.2-iFood/pull/195.diff","patch_url":"https://github.com/fga-eps-mds/2018.2-iFood/pull/195.patch","issue_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues/195","number":195,"state":"closed","locked":false,"title":"Bug fix/token authentication","user":{"login":"gustavolima00","id":32046134,"node_id":"MDQ6VXNlcjMyMDQ2MTM0","avatar_url":"https://avatars0.githubusercontent.com/u/32046134?v=4","gravatar_id":"","url":"https://api.github.com/users/gustavolima00","html_url":"https://github.com/gustavolima00","followers_url":"https://api.github.com/users/gustavolima00/followers","following_url":"https://api.github.com/users/gustavolima00/following{/other_user}","gists_url":"https://api.github.com/users/gustavolima00/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavolima00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavolima00/subscriptions","organizations_url":"https://api.github.com/users/gustavolima00/orgs","repos_url":"https://api.github.com/users/gustavolima00/repos","events_url":"https://api.github.com/users/gustavolima00/events{/privacy}","received_events_url":"https://api.github.com/users/gustavolima00/received_events","type":"User","site_admin":false},"body":"**Descrição**\r\nMudanças no retorno da função verify_token Soluciona issue #189. Para evitar problemas futuros e falta de clareza no retorno das funções da api gateway, mudei o retorno da função verify_token de booleana, para passar a retornar um response, no qual se tem mais detalhes do que acontece internamente na função. A função deixa de ter apenas 2 retornos e passa a ter os retornos:\r\n   - HTTP_400_BAD_REQUEST para um token vazio.\r\n   - HTTP_403_FORBIDDEN para problemas de autenticação.\r\n   - HTTP_500_INTERNAL_SERVER_ERROR no caso do servidor estar vazio.\r\n   - HTTP_200_OK caso a autenticação tenha sucesso.\r\n\r\nAssim como o retorno da função, houveram mudanças na verificação dentro de funções da api gateway:\r\n   - ANTES\r\n![image](https://user-images.githubusercontent.com/32046134/46909654-5193d480-cf0c-11e8-82f4-5a5bd9420c52.png)\r\n\r\n   - DEPOIS\r\n![image](https://user-images.githubusercontent.com/32046134/46909658-607a8700-cf0c-11e8-98c9-8dc5fc8bc42e.png)\r\n\r\n","created_at":"2018-10-13T20:21:48Z","updated_at":"2018-10-14T02:11:01Z","closed_at":"2018-10-14T02:11:01Z","merged_at":"2018-10-14T02:11:01Z","merge_commit_sha":"f3d520028ce434db041e794fd61f2a354d1ca8f0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls/195/commits","review_comments_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls/195/comments","review_comment_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues/195/comments","statuses_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/statuses/59d6b60e9ba03ed6c8dd45189ca202304afba344","head":{"label":"fga-eps-mds:bug-fix/token-authentication","ref":"bug-fix/token-authentication","sha":"59d6b60e9ba03ed6c8dd45189ca202304afba344","user":{"login":"fga-eps-mds","id":19551710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTUxNzEw","avatar_url":"https://avatars0.githubusercontent.com/u/19551710?v=4","gravatar_id":"","url":"https://api.github.com/users/fga-eps-mds","html_url":"https://github.com/fga-eps-mds","followers_url":"https://api.github.com/users/fga-eps-mds/followers","following_url":"https://api.github.com/users/fga-eps-mds/following{/other_user}","gists_url":"https://api.github.com/users/fga-eps-mds/gists{/gist_id}","starred_url":"https://api.github.com/users/fga-eps-mds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fga-eps-mds/subscriptions","organizations_url":"https://api.github.com/users/fga-eps-mds/orgs","repos_url":"https://api.github.com/users/fga-eps-mds/repos","events_url":"https://api.github.com/users/fga-eps-mds/events{/privacy}","received_events_url":"https://api.github.com/users/fga-eps-mds/received_events","type":"Organization","site_admin":false},"repo":{"id":144992251,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ5OTIyNTE=","name":"2018.2-iFood","full_name":"fga-eps-mds/2018.2-iFood","private":false,"owner":{"login":"fga-eps-mds","id":19551710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTUxNzEw","avatar_url":"https://avatars0.githubusercontent.com/u/19551710?v=4","gravatar_id":"","url":"https://api.github.com/users/fga-eps-mds","html_url":"https://github.com/fga-eps-mds","followers_url":"https://api.github.com/users/fga-eps-mds/followers","following_url":"https://api.github.com/users/fga-eps-mds/following{/other_user}","gists_url":"https://api.github.com/users/fga-eps-mds/gists{/gist_id}","starred_url":"https://api.github.com/users/fga-eps-mds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fga-eps-mds/subscriptions","organizations_url":"https://api.github.com/users/fga-eps-mds/orgs","repos_url":"https://api.github.com/users/fga-eps-mds/repos","events_url":"https://api.github.com/users/fga-eps-mds/events{/privacy}","received_events_url":"https://api.github.com/users/fga-eps-mds/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fga-eps-mds/2018.2-iFood","description":"Aplicativo de venda e troca de produtos na FGA","fork":false,"url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood","forks_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/forks","keys_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/teams","hooks_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/hooks","issue_events_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues/events{/number}","events_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/events","assignees_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/assignees{/user}","branches_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/branches{/branch}","tags_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/tags","blobs_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/refs{/sha}","trees_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/statuses/{sha}","languages_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/languages","stargazers_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/stargazers","contributors_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/contributors","subscribers_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/subscribers","subscription_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/subscription","commits_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/commits{/sha}","git_commits_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/commits{/sha}","comments_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/comments{/number}","issue_comment_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues/comments{/number}","contents_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/contents/{+path}","compare_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/merges","archive_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/downloads","issues_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues{/number}","pulls_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls{/number}","milestones_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/milestones{/number}","notifications_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/labels{/name}","releases_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/releases{/id}","deployments_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/deployments","created_at":"2018-08-16T13:34:41Z","updated_at":"2018-10-09T15:00:16Z","pushed_at":"2018-10-14T02:11:01Z","git_url":"git://github.com/fga-eps-mds/2018.2-iFood.git","ssh_url":"git@github.com:fga-eps-mds/2018.2-iFood.git","clone_url":"https://github.com/fga-eps-mds/2018.2-iFood.git","svn_url":"https://github.com/fga-eps-mds/2018.2-iFood","homepage":"https://fga-eps-mds.github.io/2018.2-iFood/","size":16425,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":19,"watchers":3,"default_branch":"master"}},"base":{"label":"fga-eps-mds:dev","ref":"dev","sha":"e0874f436544ccd59f0623fa0b573b1f9109c7c1","user":{"login":"fga-eps-mds","id":19551710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTUxNzEw","avatar_url":"https://avatars0.githubusercontent.com/u/19551710?v=4","gravatar_id":"","url":"https://api.github.com/users/fga-eps-mds","html_url":"https://github.com/fga-eps-mds","followers_url":"https://api.github.com/users/fga-eps-mds/followers","following_url":"https://api.github.com/users/fga-eps-mds/following{/other_user}","gists_url":"https://api.github.com/users/fga-eps-mds/gists{/gist_id}","starred_url":"https://api.github.com/users/fga-eps-mds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fga-eps-mds/subscriptions","organizations_url":"https://api.github.com/users/fga-eps-mds/orgs","repos_url":"https://api.github.com/users/fga-eps-mds/repos","events_url":"https://api.github.com/users/fga-eps-mds/events{/privacy}","received_events_url":"https://api.github.com/users/fga-eps-mds/received_events","type":"Organization","site_admin":false},"repo":{"id":144992251,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ5OTIyNTE=","name":"2018.2-iFood","full_name":"fga-eps-mds/2018.2-iFood","private":false,"owner":{"login":"fga-eps-mds","id":19551710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTUxNzEw","avatar_url":"https://avatars0.githubusercontent.com/u/19551710?v=4","gravatar_id":"","url":"https://api.github.com/users/fga-eps-mds","html_url":"https://github.com/fga-eps-mds","followers_url":"https://api.github.com/users/fga-eps-mds/followers","following_url":"https://api.github.com/users/fga-eps-mds/following{/other_user}","gists_url":"https://api.github.com/users/fga-eps-mds/gists{/gist_id}","starred_url":"https://api.github.com/users/fga-eps-mds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fga-eps-mds/subscriptions","organizations_url":"https://api.github.com/users/fga-eps-mds/orgs","repos_url":"https://api.github.com/users/fga-eps-mds/repos","events_url":"https://api.github.com/users/fga-eps-mds/events{/privacy}","received_events_url":"https://api.github.com/users/fga-eps-mds/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fga-eps-mds/2018.2-iFood","description":"Aplicativo de venda e troca de produtos na FGA","fork":false,"url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood","forks_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/forks","keys_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/teams","hooks_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/hooks","issue_events_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues/events{/number}","events_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/events","assignees_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/assignees{/user}","branches_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/branches{/branch}","tags_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/tags","blobs_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/refs{/sha}","trees_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/statuses/{sha}","languages_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/languages","stargazers_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/stargazers","contributors_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/contributors","subscribers_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/subscribers","subscription_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/subscription","commits_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/commits{/sha}","git_commits_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/git/commits{/sha}","comments_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/comments{/number}","issue_comment_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues/comments{/number}","contents_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/contents/{+path}","compare_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/merges","archive_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/downloads","issues_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues{/number}","pulls_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls{/number}","milestones_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/milestones{/number}","notifications_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/labels{/name}","releases_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/releases{/id}","deployments_url":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/deployments","created_at":"2018-08-16T13:34:41Z","updated_at":"2018-10-09T15:00:16Z","pushed_at":"2018-10-14T02:11:01Z","git_url":"git://github.com/fga-eps-mds/2018.2-iFood.git","ssh_url":"git@github.com:fga-eps-mds/2018.2-iFood.git","clone_url":"https://github.com/fga-eps-mds/2018.2-iFood.git","svn_url":"https://github.com/fga-eps-mds/2018.2-iFood","homepage":"https://fga-eps-mds.github.io/2018.2-iFood/","size":16425,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":19,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls/195"},"html":{"href":"https://github.com/fga-eps-mds/2018.2-iFood/pull/195"},"issue":{"href":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues/195"},"comments":{"href":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/fga-eps-mds/2018.2-iFood/statuses/59d6b60e9ba03ed6c8dd45189ca202304afba344"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"lucasca73","id":4529055,"node_id":"MDQ6VXNlcjQ1MjkwNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/4529055?v=4","gravatar_id":"","url":"https://api.github.com/users/lucasca73","html_url":"https://github.com/lucasca73","followers_url":"https://api.github.com/users/lucasca73/followers","following_url":"https://api.github.com/users/lucasca73/following{/other_user}","gists_url":"https://api.github.com/users/lucasca73/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasca73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasca73/subscriptions","organizations_url":"https://api.github.com/users/lucasca73/orgs","repos_url":"https://api.github.com/users/lucasca73/repos","events_url":"https://api.github.com/users/lucasca73/events{/privacy}","received_events_url":"https://api.github.com/users/lucasca73/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":44,"deletions":33,"changed_files":2}}
{"actor":{"display_login":"lucasca73"}}