{"action":"created","comment":{"url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/comments/197460948","pull_request_review_id":131213482,"id":197460948,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzQ2MDk0OA==","diff_hunk":"@@ -29,25 +29,28 @@ import scala.concurrent.{ExecutionContext, Future}\n class AuthConnector @Inject()(http: WSHttp, appConfig: AppConfig) extends Logging {\n \n   def loginAndGetToken(nino: String)(implicit hc: HeaderCarrier, ec: ExecutionContext): Future[Either[String, String]] = {\n-    http.post(appConfig.authStubUrl, Json.parse(getRequestBody(nino))).map {\n+    http.post(appConfig.authStubUrl, Json.parse(getRequestBody(Some(nino)))).map {\n       response ⇒\n         response.status match {\n           case Status.OK =>\n+            logger.info(s\"Status is OK, response.body is ${response.body}\")\n             Right(response.body)\n-          case other: Int => Left(s\"unexpected status during auth, got status=$other but 200 expected, response body=${response.body}\")\n+          case other: Int =>\n+            logger.info(s\"Status is ${response.status}, response.body is ${response.body}\")\n+            Left(s\"unexpected status during auth, got status=$other but 200 expected, response body=${response.body}\")\n         }\n     }.recover {\n       case ex ⇒ Left(s\"error during auth, error=${ex.getMessage}\")\n     }\n   }\n \n-  def getRequestBody(nino: String): String =\n+  def getRequestBody(nino: Option[String]): String =\n     s\"\"\"{\n          \"authorityId\":\"htsapi\",\n          \"affinityGroup\":\"Individual\",\n          \"confidenceLevel\":200,\n          \"credentialStrength\":\"strong\",\n-         \"nino\":\"$nino\",\n+         \"nino\":\"${nino.fold(\"\")(_.toString)}\",","path":"app/uk/gov/hmrc/helptosavetestadminfrontend/connectors/AuthConnector.scala","position":29,"original_position":29,"commit_id":"6b544a274aaf1f37fdb24293d01950421020a1b8","original_commit_id":"6b544a274aaf1f37fdb24293d01950421020a1b8","user":{"login":"Jackie1988","id":19712939,"node_id":"MDQ6VXNlcjE5NzEyOTM5","avatar_url":"https://avatars1.githubusercontent.com/u/19712939?v=4","gravatar_id":"","url":"https://api.github.com/users/Jackie1988","html_url":"https://github.com/Jackie1988","followers_url":"https://api.github.com/users/Jackie1988/followers","following_url":"https://api.github.com/users/Jackie1988/following{/other_user}","gists_url":"https://api.github.com/users/Jackie1988/gists{/gist_id}","starred_url":"https://api.github.com/users/Jackie1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jackie1988/subscriptions","organizations_url":"https://api.github.com/users/Jackie1988/orgs","repos_url":"https://api.github.com/users/Jackie1988/repos","events_url":"https://api.github.com/users/Jackie1988/events{/privacy}","received_events_url":"https://api.github.com/users/Jackie1988/received_events","type":"User","site_admin":false},"body":"should be:\r\n```scala\r\n  \"nino\" : ${nino.fold(\"null\"){n => \"\"\"\"n\"\"\"\"}}\r\n```","created_at":"2018-06-22T14:22:06Z","updated_at":"2018-06-22T14:22:06Z","html_url":"https://github.com/hmrc/help-to-save-test-admin-frontend/pull/8#discussion_r197460948","pull_request_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/8","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/comments/197460948"},"html":{"href":"https://github.com/hmrc/help-to-save-test-admin-frontend/pull/8#discussion_r197460948"},"pull_request":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/8","id":196745549,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2NzQ1NTQ5","html_url":"https://github.com/hmrc/help-to-save-test-admin-frontend/pull/8","diff_url":"https://github.com/hmrc/help-to-save-test-admin-frontend/pull/8.diff","patch_url":"https://github.com/hmrc/help-to-save-test-admin-frontend/pull/8.patch","issue_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues/8","number":8,"state":"open","locked":false,"title":"HTS-1097 made nino optional","user":{"login":"Jackie1988","id":19712939,"node_id":"MDQ6VXNlcjE5NzEyOTM5","avatar_url":"https://avatars1.githubusercontent.com/u/19712939?v=4","gravatar_id":"","url":"https://api.github.com/users/Jackie1988","html_url":"https://github.com/Jackie1988","followers_url":"https://api.github.com/users/Jackie1988/followers","following_url":"https://api.github.com/users/Jackie1988/following{/other_user}","gists_url":"https://api.github.com/users/Jackie1988/gists{/gist_id}","starred_url":"https://api.github.com/users/Jackie1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jackie1988/subscriptions","organizations_url":"https://api.github.com/users/Jackie1988/orgs","repos_url":"https://api.github.com/users/Jackie1988/repos","events_url":"https://api.github.com/users/Jackie1988/events{/privacy}","received_events_url":"https://api.github.com/users/Jackie1988/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-22T13:55:59Z","updated_at":"2018-06-22T14:22:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ce3dc63b74d8a452dd0d2dd2738458c0f1a3ec0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/8/commits","review_comments_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/8/comments","review_comment_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues/8/comments","statuses_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/statuses/6b544a274aaf1f37fdb24293d01950421020a1b8","head":{"label":"hmrc:HTS-1097","ref":"HTS-1097","sha":"6b544a274aaf1f37fdb24293d01950421020a1b8","user":{"login":"hmrc","id":5755339,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NTUzMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":134388161,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQzODgxNjE=","name":"help-to-save-test-admin-frontend","full_name":"hmrc/help-to-save-test-admin-frontend","owner":{"login":"hmrc","id":5755339,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NTUzMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/help-to-save-test-admin-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend","forks_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/forks","keys_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/teams","hooks_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/events","assignees_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/tags","blobs_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/languages","stargazers_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/subscription","commits_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/merges","archive_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/downloads","issues_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/deployments","created_at":"2018-05-22T08:57:53Z","updated_at":"2018-06-20T09:16:32Z","pushed_at":"2018-06-22T13:56:27Z","git_url":"git://github.com/hmrc/help-to-save-test-admin-frontend.git","ssh_url":"git@github.com:hmrc/help-to-save-test-admin-frontend.git","clone_url":"https://github.com/hmrc/help-to-save-test-admin-frontend.git","svn_url":"https://github.com/hmrc/help-to-save-test-admin-frontend","homepage":"","size":124,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"hmrc:master","ref":"master","sha":"5f1503d50b917e758433c9d60d5552d1d12dd759","user":{"login":"hmrc","id":5755339,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NTUzMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":134388161,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQzODgxNjE=","name":"help-to-save-test-admin-frontend","full_name":"hmrc/help-to-save-test-admin-frontend","owner":{"login":"hmrc","id":5755339,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NTUzMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/5755339?v=4","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/help-to-save-test-admin-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend","forks_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/forks","keys_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/teams","hooks_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/events","assignees_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/tags","blobs_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/languages","stargazers_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/subscription","commits_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/merges","archive_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/downloads","issues_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/deployments","created_at":"2018-05-22T08:57:53Z","updated_at":"2018-06-20T09:16:32Z","pushed_at":"2018-06-22T13:56:27Z","git_url":"git://github.com/hmrc/help-to-save-test-admin-frontend.git","ssh_url":"git@github.com:hmrc/help-to-save-test-admin-frontend.git","clone_url":"https://github.com/hmrc/help-to-save-test-admin-frontend.git","svn_url":"https://github.com/hmrc/help-to-save-test-admin-frontend","homepage":"","size":124,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/8"},"html":{"href":"https://github.com/hmrc/help-to-save-test-admin-frontend/pull/8"},"issue":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues/8"},"comments":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/hmrc/help-to-save-test-admin-frontend/statuses/6b544a274aaf1f37fdb24293d01950421020a1b8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Jackie1988"}}