{"action":"opened","number":8,"pull_request":{"url":"https://api.github.com/repos/zalando-stups/zign/pulls/8","id":51333316,"html_url":"https://github.com/zalando-stups/zign/pull/8","diff_url":"https://github.com/zalando-stups/zign/pull/8.diff","patch_url":"https://github.com/zalando-stups/zign/pull/8.patch","issue_url":"https://api.github.com/repos/zalando-stups/zign/issues/8","number":8,"state":"open","locked":false,"title":"Solves bug when reporting AuthenticationFailed.","user":{"login":"pfigue","id":325619,"avatar_url":"https://avatars.githubusercontent.com/u/325619?v=3","gravatar_id":"","url":"https://api.github.com/users/pfigue","html_url":"https://github.com/pfigue","followers_url":"https://api.github.com/users/pfigue/followers","following_url":"https://api.github.com/users/pfigue/following{/other_user}","gists_url":"https://api.github.com/users/pfigue/gists{/gist_id}","starred_url":"https://api.github.com/users/pfigue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfigue/subscriptions","organizations_url":"https://api.github.com/users/pfigue/orgs","repos_url":"https://api.github.com/users/pfigue/repos","events_url":"https://api.github.com/users/pfigue/events{/privacy}","received_events_url":"https://api.github.com/users/pfigue/received_events","type":"User","site_admin":false},"body":"Before fix, as I login with wrong credentials:\r\n\r\n$ ./venv-3.4/bin/zign token\r\nPassword for pfigue: invalidPassword\r\nTraceback (most recent call last):\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/zign/api.py\", line 115, in get_named_token\r\n    result = get_new_token(realm, scope, user, password, url=url, insecure=insecure)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/zign/api.py\", line 57, in get_new_token\r\n    raise AuthenticationFailed('Token Service returned {}'.format(response.text))\r\nzign.api.AuthenticationFailed: Authentication failed: Token Service returned {\"code\":401,\"message\":\"ERROR sendRequest(): {\\\"error\\\":\\\"invalid_grant\\\",\\\"error_description\\\":\\\"The provided access grant is invalid, expired, or revoked.\\\"}\\n\",\"reason\":\"Unauthorized\"}\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"./venv-3.4/bin/zign\", line 9, in <module>\r\n    load_entry_point('stups-zign==0.17', 'console_scripts', 'zign')()\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/zign/cli.py\", line 108, in main\r\n    cli()\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/click/core.py\", line 700, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/click/core.py\", line 680, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/click/core.py\", line 1027, in invoke\r\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/click/core.py\", line 873, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/click/core.py\", line 508, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/click/decorators.py\", line 26, in new_func\r\n    return f(get_current_context().obj, *args, **kwargs)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/zign/cli.py\", line 99, in token\r\n    token = get_named_token(scope, realm, name, user, password, url, insecure, refresh, prompt=True)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/zign/api.py\", line 119, in get_named_token\r\n    error(e)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/clickclick/console.py\", line 49, in error\r\n    secho(msg, fg='red', bold=True, **kwargs)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/clickclick/console.py\", line 37, in secho\r\n    click.secho(*args, **kwargs)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/click/termui.py\", line 417, in secho\r\n    return echo(style(text, **styles), file=file, nl=nl, err=err, color=color)\r\n  File \"/home/pfigue/Workspace/playing-with-stups/venv-3.4/lib/python3.4/site-packages/click/termui.py\", line 390, in style\r\n    return ''.join(bits)\r\nTypeError: sequence item 2: expected str instance, AuthenticationFailed found\r\n\r\n\r\nAfter fix:\r\n\r\n$ ./venv-3.4/bin/zign token\r\nPassword for pfigue: invalidPassword\r\nAuthentication failed: Token Service returned {\"code\":401,\"message\":\"ERROR sendRequest(): {\\\"error\\\":\\\"invalid_grant\\\",\\\"error_description\\\":\\\"The provided access grant is invalid, expired, or revoked.\\\"}\\n\",\"reason\":\"Unauthorized\"}\r\nPlease check your username and password and try again.\r\nPassword for pfigue: \r\nAborted!\r\n","created_at":"2015-11-20T09:18:28Z","updated_at":"2015-11-20T09:18:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zalando-stups/zign/pulls/8/commits","review_comments_url":"https://api.github.com/repos/zalando-stups/zign/pulls/8/comments","review_comment_url":"https://api.github.com/repos/zalando-stups/zign/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zalando-stups/zign/issues/8/comments","statuses_url":"https://api.github.com/repos/zalando-stups/zign/statuses/9c8ff9e9adbec688e4a9508e15c5a45d7befc26f","head":{"label":"pfigue:bug-error-message-AuthenticationFailed","ref":"bug-error-message-AuthenticationFailed","sha":"9c8ff9e9adbec688e4a9508e15c5a45d7befc26f","user":{"login":"pfigue","id":325619,"avatar_url":"https://avatars.githubusercontent.com/u/325619?v=3","gravatar_id":"","url":"https://api.github.com/users/pfigue","html_url":"https://github.com/pfigue","followers_url":"https://api.github.com/users/pfigue/followers","following_url":"https://api.github.com/users/pfigue/following{/other_user}","gists_url":"https://api.github.com/users/pfigue/gists{/gist_id}","starred_url":"https://api.github.com/users/pfigue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfigue/subscriptions","organizations_url":"https://api.github.com/users/pfigue/orgs","repos_url":"https://api.github.com/users/pfigue/repos","events_url":"https://api.github.com/users/pfigue/events{/privacy}","received_events_url":"https://api.github.com/users/pfigue/received_events","type":"User","site_admin":false},"repo":{"id":46550873,"name":"zign","full_name":"pfigue/zign","owner":{"login":"pfigue","id":325619,"avatar_url":"https://avatars.githubusercontent.com/u/325619?v=3","gravatar_id":"","url":"https://api.github.com/users/pfigue","html_url":"https://github.com/pfigue","followers_url":"https://api.github.com/users/pfigue/followers","following_url":"https://api.github.com/users/pfigue/following{/other_user}","gists_url":"https://api.github.com/users/pfigue/gists{/gist_id}","starred_url":"https://api.github.com/users/pfigue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfigue/subscriptions","organizations_url":"https://api.github.com/users/pfigue/orgs","repos_url":"https://api.github.com/users/pfigue/repos","events_url":"https://api.github.com/users/pfigue/events{/privacy}","received_events_url":"https://api.github.com/users/pfigue/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pfigue/zign","description":"Command line client to generate OAuth2 access tokens","fork":true,"url":"https://api.github.com/repos/pfigue/zign","forks_url":"https://api.github.com/repos/pfigue/zign/forks","keys_url":"https://api.github.com/repos/pfigue/zign/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfigue/zign/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfigue/zign/teams","hooks_url":"https://api.github.com/repos/pfigue/zign/hooks","issue_events_url":"https://api.github.com/repos/pfigue/zign/issues/events{/number}","events_url":"https://api.github.com/repos/pfigue/zign/events","assignees_url":"https://api.github.com/repos/pfigue/zign/assignees{/user}","branches_url":"https://api.github.com/repos/pfigue/zign/branches{/branch}","tags_url":"https://api.github.com/repos/pfigue/zign/tags","blobs_url":"https://api.github.com/repos/pfigue/zign/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfigue/zign/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfigue/zign/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfigue/zign/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfigue/zign/statuses/{sha}","languages_url":"https://api.github.com/repos/pfigue/zign/languages","stargazers_url":"https://api.github.com/repos/pfigue/zign/stargazers","contributors_url":"https://api.github.com/repos/pfigue/zign/contributors","subscribers_url":"https://api.github.com/repos/pfigue/zign/subscribers","subscription_url":"https://api.github.com/repos/pfigue/zign/subscription","commits_url":"https://api.github.com/repos/pfigue/zign/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfigue/zign/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfigue/zign/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfigue/zign/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfigue/zign/contents/{+path}","compare_url":"https://api.github.com/repos/pfigue/zign/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfigue/zign/merges","archive_url":"https://api.github.com/repos/pfigue/zign/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfigue/zign/downloads","issues_url":"https://api.github.com/repos/pfigue/zign/issues{/number}","pulls_url":"https://api.github.com/repos/pfigue/zign/pulls{/number}","milestones_url":"https://api.github.com/repos/pfigue/zign/milestones{/number}","notifications_url":"https://api.github.com/repos/pfigue/zign/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfigue/zign/labels{/name}","releases_url":"https://api.github.com/repos/pfigue/zign/releases{/id}","created_at":"2015-11-20T08:59:01Z","updated_at":"2015-11-20T08:59:02Z","pushed_at":"2015-11-20T09:16:37Z","git_url":"git://github.com/pfigue/zign.git","ssh_url":"git@github.com:pfigue/zign.git","clone_url":"https://github.com/pfigue/zign.git","svn_url":"https://github.com/pfigue/zign","homepage":"http://docs.stups.io/en/latest/components/zign.html","size":35,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zalando-stups:master","ref":"master","sha":"db304001f83674a946a61ff9ec56b494a4ea174e","user":{"login":"zalando-stups","id":11431876,"avatar_url":"https://avatars.githubusercontent.com/u/11431876?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-stups","html_url":"https://github.com/zalando-stups","followers_url":"https://api.github.com/users/zalando-stups/followers","following_url":"https://api.github.com/users/zalando-stups/following{/other_user}","gists_url":"https://api.github.com/users/zalando-stups/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-stups/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-stups/subscriptions","organizations_url":"https://api.github.com/users/zalando-stups/orgs","repos_url":"https://api.github.com/users/zalando-stups/repos","events_url":"https://api.github.com/users/zalando-stups/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-stups/received_events","type":"Organization","site_admin":false},"repo":{"id":35542593,"name":"zign","full_name":"zalando-stups/zign","owner":{"login":"zalando-stups","id":11431876,"avatar_url":"https://avatars.githubusercontent.com/u/11431876?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-stups","html_url":"https://github.com/zalando-stups","followers_url":"https://api.github.com/users/zalando-stups/followers","following_url":"https://api.github.com/users/zalando-stups/following{/other_user}","gists_url":"https://api.github.com/users/zalando-stups/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-stups/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-stups/subscriptions","organizations_url":"https://api.github.com/users/zalando-stups/orgs","repos_url":"https://api.github.com/users/zalando-stups/repos","events_url":"https://api.github.com/users/zalando-stups/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-stups/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando-stups/zign","description":"Command line client to generate OAuth2 access tokens","fork":false,"url":"https://api.github.com/repos/zalando-stups/zign","forks_url":"https://api.github.com/repos/zalando-stups/zign/forks","keys_url":"https://api.github.com/repos/zalando-stups/zign/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando-stups/zign/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando-stups/zign/teams","hooks_url":"https://api.github.com/repos/zalando-stups/zign/hooks","issue_events_url":"https://api.github.com/repos/zalando-stups/zign/issues/events{/number}","events_url":"https://api.github.com/repos/zalando-stups/zign/events","assignees_url":"https://api.github.com/repos/zalando-stups/zign/assignees{/user}","branches_url":"https://api.github.com/repos/zalando-stups/zign/branches{/branch}","tags_url":"https://api.github.com/repos/zalando-stups/zign/tags","blobs_url":"https://api.github.com/repos/zalando-stups/zign/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando-stups/zign/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando-stups/zign/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando-stups/zign/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando-stups/zign/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando-stups/zign/languages","stargazers_url":"https://api.github.com/repos/zalando-stups/zign/stargazers","contributors_url":"https://api.github.com/repos/zalando-stups/zign/contributors","subscribers_url":"https://api.github.com/repos/zalando-stups/zign/subscribers","subscription_url":"https://api.github.com/repos/zalando-stups/zign/subscription","commits_url":"https://api.github.com/repos/zalando-stups/zign/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando-stups/zign/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando-stups/zign/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando-stups/zign/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando-stups/zign/contents/{+path}","compare_url":"https://api.github.com/repos/zalando-stups/zign/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando-stups/zign/merges","archive_url":"https://api.github.com/repos/zalando-stups/zign/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando-stups/zign/downloads","issues_url":"https://api.github.com/repos/zalando-stups/zign/issues{/number}","pulls_url":"https://api.github.com/repos/zalando-stups/zign/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando-stups/zign/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando-stups/zign/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando-stups/zign/labels{/name}","releases_url":"https://api.github.com/repos/zalando-stups/zign/releases{/id}","created_at":"2015-05-13T10:23:39Z","updated_at":"2015-05-19T09:26:27Z","pushed_at":"2015-11-19T22:49:48Z","git_url":"git://github.com/zalando-stups/zign.git","ssh_url":"git@github.com:zalando-stups/zign.git","clone_url":"https://github.com/zalando-stups/zign.git","svn_url":"https://github.com/zalando-stups/zign","homepage":"http://docs.stups.io/en/latest/components/zign.html","size":33,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zalando-stups/zign/pulls/8"},"html":{"href":"https://github.com/zalando-stups/zign/pull/8"},"issue":{"href":"https://api.github.com/repos/zalando-stups/zign/issues/8"},"comments":{"href":"https://api.github.com/repos/zalando-stups/zign/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/zalando-stups/zign/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/zalando-stups/zign/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zalando-stups/zign/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/zalando-stups/zign/statuses/9c8ff9e9adbec688e4a9508e15c5a45d7befc26f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}