{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/comments/33574856","id":33574856,"diff_hunk":"@@ -0,0 +1,59 @@\n+import com.gu.identity.play.IdMinimalUser\n+import play.api.libs.functional.syntax._\n+import play.api.libs.json._\n+\n+package object services {\n+\n+  case class UserId(id:String) {\n+    override def toString = id\n+  }\n+\n+  object UserId {\n+    val paramName = \"user-id\"\n+\n+    implicit val jsonReader = new Reads[UserId] {\n+      override def reads(json: JsValue): JsResult[UserId] = json match {\n+        case JsString(id) => JsSuccess(UserId(id))\n+        case _            => JsError(\"Cannot parse UserId\")\n+      }\n+    }\n+  }\n+\n+  case class IdentityToken(token: String) {\n+    override def toString = token\n+  }\n+\n+  object IdentityToken {\n+    val paramName = \"identity-token\"\n+\n+    implicit val jsonReader = new Reads[IdentityToken] {\n+      override def reads(json: JsValue): JsResult[IdentityToken] = json match {\n+        case JsString(id) => JsSuccess(IdentityToken(id))\n+        case _            => JsError(\"Cannot parse IdentityToken\")\n+      }\n+    }\n+  }\n+\n+  sealed trait UserIdData {\n+    def id: UserId\n+  }\n+\n+  case class MinimalIdUser(user: IdMinimalUser) extends UserIdData {","path":"app/services/package.scala","position":41,"original_position":41,"commit_id":"00a1b538da6b144aa2d86f8ec408dabbebe8e3e1","original_commit_id":"3362968e92d8b5ccf9d2aeb43f290046487b27df","user":{"login":"jennysivapalan","id":944375,"avatar_url":"https://avatars.githubusercontent.com/u/944375?v=3","gravatar_id":"","url":"https://api.github.com/users/jennysivapalan","html_url":"https://github.com/jennysivapalan","followers_url":"https://api.github.com/users/jennysivapalan/followers","following_url":"https://api.github.com/users/jennysivapalan/following{/other_user}","gists_url":"https://api.github.com/users/jennysivapalan/gists{/gist_id}","starred_url":"https://api.github.com/users/jennysivapalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennysivapalan/subscriptions","organizations_url":"https://api.github.com/users/jennysivapalan/orgs","repos_url":"https://api.github.com/users/jennysivapalan/repos","events_url":"https://api.github.com/users/jennysivapalan/events{/privacy}","received_events_url":"https://api.github.com/users/jennysivapalan/received_events","type":"User","site_admin":false},"body":"Okay I see - I didn't spot where it was being used in the Controller. I think this is okay but we need to use IdMinimalUser when implementing `test-users` and I'm a bit concerned we're going to get ourselves confused with the type of User. @rtyley what do you think?","created_at":"2015-06-30T13:58:02Z","updated_at":"2015-06-30T13:58:02Z","html_url":"https://github.com/guardian/subscriptions-frontend/pull/58#discussion_r33574856","pull_request_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/comments/33574856"},"html":{"href":"https://github.com/guardian/subscriptions-frontend/pull/58#discussion_r33574856"},"pull_request":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/58","id":38876210,"html_url":"https://github.com/guardian/subscriptions-frontend/pull/58","diff_url":"https://github.com/guardian/subscriptions-frontend/pull/58.diff","patch_url":"https://github.com/guardian/subscriptions-frontend/pull/58.patch","issue_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/58","number":58,"state":"open","locked":false,"title":"Convert guest users","user":{"login":"afiore","id":63361,"avatar_url":"https://avatars.githubusercontent.com/u/63361?v=3","gravatar_id":"","url":"https://api.github.com/users/afiore","html_url":"https://github.com/afiore","followers_url":"https://api.github.com/users/afiore/followers","following_url":"https://api.github.com/users/afiore/following{/other_user}","gists_url":"https://api.github.com/users/afiore/gists{/gist_id}","starred_url":"https://api.github.com/users/afiore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afiore/subscriptions","organizations_url":"https://api.github.com/users/afiore/orgs","repos_url":"https://api.github.com/users/afiore/repos","events_url":"https://api.github.com/users/afiore/events{/privacy}","received_events_url":"https://api.github.com/users/afiore/received_events","type":"User","site_admin":false},"body":"When a guest user subscribes, display a form in the thank you page inviting her to complete her account by setting password. This PR implements only a basic password validation, I plan on adding the same password strength widget used in Identity-frontend and Membership in a separate one.\r\n\r\n![screen shot 2015-06-30 at 14 05 56](https://cloud.githubusercontent.com/assets/63361/8431562/503dc952-1f32-11e5-9ec3-084250afb501.png)\r\n\r\nOn successful submission of the password form the user gets redirected to another page\r\nlinking to the Identity frontend website.\r\n\r\n![screen shot 2015-06-30 at 14 02 05](https://cloud.githubusercontent.com/assets/63361/8431586/6c9b0e02-1f32-11e5-8dff-b8f7e07d8421.png)\r\n\r\n@rtyley @jennysivapalan @tudorraul \r\n \r\n","created_at":"2015-06-30T13:17:04Z","updated_at":"2015-06-30T13:58:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"318fb71076877500832ff12ff886255bb76dc6a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/58/commits","review_comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/58/comments","review_comment_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/58/comments","statuses_url":"https://api.github.com/repos/guardian/subscriptions-frontend/statuses/00a1b538da6b144aa2d86f8ec408dabbebe8e3e1","head":{"label":"guardian:convert-guest-users","ref":"convert-guest-users","sha":"00a1b538da6b144aa2d86f8ec408dabbebe8e3e1","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":34392023,"name":"subscriptions-frontend","full_name":"guardian/subscriptions-frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/subscriptions-frontend","description":"","fork":false,"url":"https://api.github.com/repos/guardian/subscriptions-frontend","forks_url":"https://api.github.com/repos/guardian/subscriptions-frontend/forks","keys_url":"https://api.github.com/repos/guardian/subscriptions-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/subscriptions-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/subscriptions-frontend/teams","hooks_url":"https://api.github.com/repos/guardian/subscriptions-frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/events","assignees_url":"https://api.github.com/repos/guardian/subscriptions-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/subscriptions-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/subscriptions-frontend/tags","blobs_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/subscriptions-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/subscriptions-frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/subscriptions-frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/subscriptions-frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/subscriptions-frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/subscriptions-frontend/subscription","commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/subscriptions-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/subscriptions-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/subscriptions-frontend/merges","archive_url":"https://api.github.com/repos/guardian/subscriptions-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/subscriptions-frontend/downloads","issues_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/subscriptions-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/subscriptions-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/subscriptions-frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/subscriptions-frontend/releases{/id}","created_at":"2015-04-22T13:30:13Z","updated_at":"2015-06-08T09:08:52Z","pushed_at":"2015-06-30T13:53:50Z","git_url":"git://github.com/guardian/subscriptions-frontend.git","ssh_url":"git@github.com:guardian/subscriptions-frontend.git","clone_url":"https://github.com/guardian/subscriptions-frontend.git","svn_url":"https://github.com/guardian/subscriptions-frontend","homepage":"https://sites.google.com/a/guardian.co.uk/guardian-subscriptions/","size":3128,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"112da4bc21f3f3a2bbbf2b76115ff395729b054c","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":34392023,"name":"subscriptions-frontend","full_name":"guardian/subscriptions-frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/subscriptions-frontend","description":"","fork":false,"url":"https://api.github.com/repos/guardian/subscriptions-frontend","forks_url":"https://api.github.com/repos/guardian/subscriptions-frontend/forks","keys_url":"https://api.github.com/repos/guardian/subscriptions-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/subscriptions-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/subscriptions-frontend/teams","hooks_url":"https://api.github.com/repos/guardian/subscriptions-frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/subscriptions-frontend/events","assignees_url":"https://api.github.com/repos/guardian/subscriptions-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/subscriptions-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/subscriptions-frontend/tags","blobs_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/subscriptions-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/subscriptions-frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/subscriptions-frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/subscriptions-frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/subscriptions-frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/subscriptions-frontend/subscription","commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/subscriptions-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/subscriptions-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/subscriptions-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/subscriptions-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/subscriptions-frontend/merges","archive_url":"https://api.github.com/repos/guardian/subscriptions-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/subscriptions-frontend/downloads","issues_url":"https://api.github.com/repos/guardian/subscriptions-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/subscriptions-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/subscriptions-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/subscriptions-frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/subscriptions-frontend/releases{/id}","created_at":"2015-04-22T13:30:13Z","updated_at":"2015-06-08T09:08:52Z","pushed_at":"2015-06-30T13:53:50Z","git_url":"git://github.com/guardian/subscriptions-frontend.git","ssh_url":"git@github.com:guardian/subscriptions-frontend.git","clone_url":"https://github.com/guardian/subscriptions-frontend.git","svn_url":"https://github.com/guardian/subscriptions-frontend","homepage":"https://sites.google.com/a/guardian.co.uk/guardian-subscriptions/","size":3128,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/58"},"html":{"href":"https://github.com/guardian/subscriptions-frontend/pull/58"},"issue":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/58"},"comments":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/subscriptions-frontend/statuses/00a1b538da6b144aa2d86f8ec408dabbebe8e3e1"}}}}