{"action":"created","comment":{"url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/comments/25237404","id":25237404,"diff_hunk":"@@ -0,0 +1,139 @@\n+\"\"\"Contains UI methods for LE user operations.\"\"\"\n+import os\n+import sys\n+\n+import zope.component\n+\n+from letsencrypt.client import interfaces\n+from letsencrypt.client.display import util as display_util\n+\n+# Define a helper function to avoid verbose code\n+util = zope.component.getUtility  # pylint: disable=invalid-name\n+\n+\n+def choose_authenticator(auths, errs):\n+    \"\"\"Allow the user to choose their authenticator.\n+\n+    :param list auths: Where each of type\n+        :class:`letsencrypt.client.interfaces.IAuthenticator` object\n+    :param dict errs: Mapping IAuthenticator objects to error messages\n+\n+    :returns: Authenticator selected\n+    :rtype: :class:`letsencrypt.client.interfaces.IAuthenticator`\n+\n+    \"\"\"\n+    descs = [auth.description if auth not in errs\n+             else \"%s (Misconfigured)\" % auth.description\n+             for auth in auths]\n+\n+    while True:\n+        code, index = util(interfaces.IDisplay).menu(\n+            \"How would you like to authenticate with the Let's Encrypt CA?\",\n+            descs, help_label=\"More Info\")\n+\n+        if code == display_util.OK:\n+            return auths[index]\n+        elif code == display_util.HELP:\n+            if auths[index] in errs:\n+                msg = \"Reported Error: %s\" % errs[auths[index]]\n+            else:\n+                msg = auths[index].more_info()\n+            util(interfaces.IDisplay).notification(\n+                msg, height=display_util.HEIGHT)\n+        else:\n+            sys.exit(0)\n+\n+\n+def choose_names(installer):\n+    \"\"\"Display screen to select domains to validate.\n+\n+    :param installer: An installer object\n+    :type installer: :class:`letsencrypt.client.interfaces.IInstaller`\n+\n+    \"\"\"\n+    if installer is None:\n+        return _choose_names_manually()\n+\n+    names = list(installer.get_all_names())\n+\n+    if not names:\n+        manual = util(interfaces.IDisplay).yesno(\n+            \"No names were found in your configuration files.{0}You should \"\n+            \"specify ServerNames in your config files in order to allow for \"\n+            \"accurate installation of your certificate.{0}\"\n+            \"If you do use the default vhost, you may specify the name \"\n+            \"manually. Would you like to continue?{0}\".format(os.linesep))\n+\n+        if manual:\n+            return _choose_names_manually()\n+        else:\n+            sys.exit(0)","path":"letsencrypt/client/display/ops.py","position":70,"original_position":70,"commit_id":"17741a0fbf3ce7381a249f270d24779315471de1","original_commit_id":"17741a0fbf3ce7381a249f270d24779315471de1","user":{"login":"jdkasten","id":1581662,"avatar_url":"https://avatars.githubusercontent.com/u/1581662?v=3","gravatar_id":"","url":"https://api.github.com/users/jdkasten","html_url":"https://github.com/jdkasten","followers_url":"https://api.github.com/users/jdkasten/followers","following_url":"https://api.github.com/users/jdkasten/following{/other_user}","gists_url":"https://api.github.com/users/jdkasten/gists{/gist_id}","starred_url":"https://api.github.com/users/jdkasten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdkasten/subscriptions","organizations_url":"https://api.github.com/users/jdkasten/orgs","repos_url":"https://api.github.com/users/jdkasten/repos","events_url":"https://api.github.com/users/jdkasten/events{/privacy}","received_events_url":"https://api.github.com/users/jdkasten/received_events","type":"User","site_admin":false},"body":"Would you like to continue... answer = No","created_at":"2015-02-24T09:10:08Z","updated_at":"2015-02-24T09:10:08Z","html_url":"https://github.com/letsencrypt/lets-encrypt-preview/pull/250#discussion_r25237404","pull_request_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/250","_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/comments/25237404"},"html":{"href":"https://github.com/letsencrypt/lets-encrypt-preview/pull/250#discussion_r25237404"},"pull_request":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/250"}}},"pull_request":{"url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/250","id":29676186,"html_url":"https://github.com/letsencrypt/lets-encrypt-preview/pull/250","diff_url":"https://github.com/letsencrypt/lets-encrypt-preview/pull/250.diff","patch_url":"https://github.com/letsencrypt/lets-encrypt-preview/pull/250.patch","issue_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues/250","number":250,"state":"open","locked":false,"title":"Display/Revoker Overhaul","user":{"login":"jdkasten","id":1581662,"avatar_url":"https://avatars.githubusercontent.com/u/1581662?v=3","gravatar_id":"","url":"https://api.github.com/users/jdkasten","html_url":"https://github.com/jdkasten","followers_url":"https://api.github.com/users/jdkasten/followers","following_url":"https://api.github.com/users/jdkasten/following{/other_user}","gists_url":"https://api.github.com/users/jdkasten/gists{/gist_id}","starred_url":"https://api.github.com/users/jdkasten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdkasten/subscriptions","organizations_url":"https://api.github.com/users/jdkasten/orgs","repos_url":"https://api.github.com/users/jdkasten/repos","events_url":"https://api.github.com/users/jdkasten/events{/privacy}","received_events_url":"https://api.github.com/users/jdkasten/received_events","type":"User","site_admin":false},"body":"High level description.\r\nhttps://github.com/letsencrypt/lets-encrypt-preview/commit/b4c327be38e015a6081ab264ce6124f166e65904#commitcomment-9798519\r\n\r\nThis PR also integrates the Standalone Authenticator and should make it easier to integrate the DNS authenticator (still need to work out permissions issues and a bit of code cleanup).\r\n\r\nI have done some integration testing for all of the new features and have 100% test code coverage for all display code, the revoker code and the determine_authenticator code.\r\n\r\nThis PR is massive, but it adds new necessary features, fixes several bugs in the earlier version and I believe it simplifies things moving forward.\r\n\r\nComments are appreciated.","created_at":"2015-02-20T06:46:28Z","updated_at":"2015-02-24T09:10:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fccd60900833bcaf3ed8979dff1e6dd77d7175b9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/250/commits","review_comments_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/250/comments","review_comment_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/comments{/number}","comments_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues/250/comments","statuses_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/statuses/17741a0fbf3ce7381a249f270d24779315471de1","head":{"label":"letsencrypt:revoker","ref":"revoker","sha":"17741a0fbf3ce7381a249f270d24779315471de1","user":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":26516210,"name":"lets-encrypt-preview","full_name":"letsencrypt/lets-encrypt-preview","owner":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/letsencrypt/lets-encrypt-preview","description":"An ACME client that can update Apache configurations (developer preview) ","fork":false,"url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview","forks_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/forks","keys_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/teams","hooks_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/events","assignees_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/tags","blobs_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/subscription","commits_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/merges","archive_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/downloads","issues_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/releases{/id}","created_at":"2014-11-12T02:52:20Z","updated_at":"2015-02-24T05:23:05Z","pushed_at":"2015-02-24T07:19:48Z","git_url":"git://github.com/letsencrypt/lets-encrypt-preview.git","ssh_url":"git@github.com:letsencrypt/lets-encrypt-preview.git","clone_url":"https://github.com/letsencrypt/lets-encrypt-preview.git","svn_url":"https://github.com/letsencrypt/lets-encrypt-preview","homepage":null,"size":5228,"stargazers_count":1472,"watchers_count":1472,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":50,"forks":97,"open_issues":50,"watchers":1472,"default_branch":"master"}},"base":{"label":"letsencrypt:master","ref":"master","sha":"5ab9b7c331a4fbef31aec05794ae6dadaefafba5","user":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":26516210,"name":"lets-encrypt-preview","full_name":"letsencrypt/lets-encrypt-preview","owner":{"login":"letsencrypt","id":9289019,"avatar_url":"https://avatars.githubusercontent.com/u/9289019?v=3","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/letsencrypt/lets-encrypt-preview","description":"An ACME client that can update Apache configurations (developer preview) ","fork":false,"url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview","forks_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/forks","keys_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/teams","hooks_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/events","assignees_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/tags","blobs_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/subscription","commits_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/merges","archive_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/downloads","issues_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/releases{/id}","created_at":"2014-11-12T02:52:20Z","updated_at":"2015-02-24T05:23:05Z","pushed_at":"2015-02-24T07:19:48Z","git_url":"git://github.com/letsencrypt/lets-encrypt-preview.git","ssh_url":"git@github.com:letsencrypt/lets-encrypt-preview.git","clone_url":"https://github.com/letsencrypt/lets-encrypt-preview.git","svn_url":"https://github.com/letsencrypt/lets-encrypt-preview","homepage":null,"size":5228,"stargazers_count":1472,"watchers_count":1472,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":50,"forks":97,"open_issues":50,"watchers":1472,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/250"},"html":{"href":"https://github.com/letsencrypt/lets-encrypt-preview/pull/250"},"issue":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues/250"},"comments":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/issues/250/comments"},"review_comments":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/250/comments"},"review_comment":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/pulls/250/commits"},"statuses":{"href":"https://api.github.com/repos/letsencrypt/lets-encrypt-preview/statuses/17741a0fbf3ce7381a249f270d24779315471de1"}}}}