{"action":"created","comment":{"url":"https://api.github.com/repos/ajantis/c3-web-next/pulls/comments/55346867","id":55346867,"diff_hunk":"@@ -0,0 +1,61 @@\n+package com.ifunsoftware.c3web.routing\n+\n+/**\n+ * Created by alexander on 9/22/2015.\n+ */\n+\n+import akka.actor.{ Actor, Props }\n+import com.ifunsoftware.c3web.models.AuthInfo\n+import com.ifunsoftware.c3web.models.AuthInfoEntryJson._\n+import com.ifunsoftware.c3web.service.AuthenticationService\n+import org.slf4j.LoggerFactory\n+import spray.http.StatusCodes\n+import spray.httpx.SprayJsonSupport\n+import spray.routing.HttpService\n+\n+/**\n+ * Factory method for Props configuration files for actors\n+ */\n+object AuthRoute {\n+  def props: Props = Props(new AuthRoute())\n+}\n+\n+/**\n+ * Actor that handles requests that begin with \"auth\" (authentication)\n+ */\n+class AuthRoute() extends Actor with AuthRouteTrait {\n+  def actorRefFactory = context\n+  def receive = runRoute(authRoute)\n+}\n+\n+/**\n+ * Separate routing logic in an HttpService trait so that the\n+ * routing logic can be tested outside of an actor system in specs/mockito tests\n+ */\n+trait AuthRouteTrait extends HttpService with SprayJsonSupport {","path":"c3web-server/src/main/scala/com/ifunsoftware/c3web/routing/AuthRoute.scala","position":35,"original_position":35,"commit_id":"4f3a1cf1a118002ad2b7e9e65b0f9e9633d6f999","original_commit_id":"4f3a1cf1a118002ad2b7e9e65b0f9e9633d6f999","user":{"login":"ajantis","id":852618,"avatar_url":"https://avatars.githubusercontent.com/u/852618?v=3","gravatar_id":"","url":"https://api.github.com/users/ajantis","html_url":"https://github.com/ajantis","followers_url":"https://api.github.com/users/ajantis/followers","following_url":"https://api.github.com/users/ajantis/following{/other_user}","gists_url":"https://api.github.com/users/ajantis/gists{/gist_id}","starred_url":"https://api.github.com/users/ajantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajantis/subscriptions","organizations_url":"https://api.github.com/users/ajantis/orgs","repos_url":"https://api.github.com/users/ajantis/repos","events_url":"https://api.github.com/users/ajantis/events{/privacy}","received_events_url":"https://api.github.com/users/ajantis/received_events","type":"User","site_admin":false},"body":"why not making it just a `Route`, not a service? \r\nGenerally, it's typical to have only one instance of `HttpService` in a spray app which combines multiple routes.\r\n","created_at":"2016-03-08T11:27:30Z","updated_at":"2016-03-08T11:27:30Z","html_url":"https://github.com/ajantis/c3-web-next/pull/2#discussion_r55346867","pull_request_url":"https://api.github.com/repos/ajantis/c3-web-next/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ajantis/c3-web-next/pulls/comments/55346867"},"html":{"href":"https://github.com/ajantis/c3-web-next/pull/2#discussion_r55346867"},"pull_request":{"href":"https://api.github.com/repos/ajantis/c3-web-next/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ajantis/c3-web-next/pulls/2","id":61803867,"html_url":"https://github.com/ajantis/c3-web-next/pull/2","diff_url":"https://github.com/ajantis/c3-web-next/pull/2.diff","patch_url":"https://github.com/ajantis/c3-web-next/pull/2.patch","issue_url":"https://api.github.com/repos/ajantis/c3-web-next/issues/2","number":2,"state":"open","locked":false,"title":"updated static pages","user":{"login":"Haid26","id":6272678,"avatar_url":"https://avatars.githubusercontent.com/u/6272678?v=3","gravatar_id":"","url":"https://api.github.com/users/Haid26","html_url":"https://github.com/Haid26","followers_url":"https://api.github.com/users/Haid26/followers","following_url":"https://api.github.com/users/Haid26/following{/other_user}","gists_url":"https://api.github.com/users/Haid26/gists{/gist_id}","starred_url":"https://api.github.com/users/Haid26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Haid26/subscriptions","organizations_url":"https://api.github.com/users/Haid26/orgs","repos_url":"https://api.github.com/users/Haid26/repos","events_url":"https://api.github.com/users/Haid26/events{/privacy}","received_events_url":"https://api.github.com/users/Haid26/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-05T06:55:23Z","updated_at":"2016-03-08T11:27:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ajantis/c3-web-next/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ajantis/c3-web-next/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ajantis/c3-web-next/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ajantis/c3-web-next/issues/2/comments","statuses_url":"https://api.github.com/repos/ajantis/c3-web-next/statuses/4f3a1cf1a118002ad2b7e9e65b0f9e9633d6f999","head":{"label":"C3Junior:master","ref":"master","sha":"4f3a1cf1a118002ad2b7e9e65b0f9e9633d6f999","user":{"login":"C3Junior","id":7823432,"avatar_url":"https://avatars.githubusercontent.com/u/7823432?v=3","gravatar_id":"","url":"https://api.github.com/users/C3Junior","html_url":"https://github.com/C3Junior","followers_url":"https://api.github.com/users/C3Junior/followers","following_url":"https://api.github.com/users/C3Junior/following{/other_user}","gists_url":"https://api.github.com/users/C3Junior/gists{/gist_id}","starred_url":"https://api.github.com/users/C3Junior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C3Junior/subscriptions","organizations_url":"https://api.github.com/users/C3Junior/orgs","repos_url":"https://api.github.com/users/C3Junior/repos","events_url":"https://api.github.com/users/C3Junior/events{/privacy}","received_events_url":"https://api.github.com/users/C3Junior/received_events","type":"Organization","site_admin":false},"repo":{"id":42734792,"name":"c3-web-next","full_name":"C3Junior/c3-web-next","owner":{"login":"C3Junior","id":7823432,"avatar_url":"https://avatars.githubusercontent.com/u/7823432?v=3","gravatar_id":"","url":"https://api.github.com/users/C3Junior","html_url":"https://github.com/C3Junior","followers_url":"https://api.github.com/users/C3Junior/followers","following_url":"https://api.github.com/users/C3Junior/following{/other_user}","gists_url":"https://api.github.com/users/C3Junior/gists{/gist_id}","starred_url":"https://api.github.com/users/C3Junior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/C3Junior/subscriptions","organizations_url":"https://api.github.com/users/C3Junior/orgs","repos_url":"https://api.github.com/users/C3Junior/repos","events_url":"https://api.github.com/users/C3Junior/events{/privacy}","received_events_url":"https://api.github.com/users/C3Junior/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/C3Junior/c3-web-next","description":"The next generation of C3 Web platform","fork":true,"url":"https://api.github.com/repos/C3Junior/c3-web-next","forks_url":"https://api.github.com/repos/C3Junior/c3-web-next/forks","keys_url":"https://api.github.com/repos/C3Junior/c3-web-next/keys{/key_id}","collaborators_url":"https://api.github.com/repos/C3Junior/c3-web-next/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/C3Junior/c3-web-next/teams","hooks_url":"https://api.github.com/repos/C3Junior/c3-web-next/hooks","issue_events_url":"https://api.github.com/repos/C3Junior/c3-web-next/issues/events{/number}","events_url":"https://api.github.com/repos/C3Junior/c3-web-next/events","assignees_url":"https://api.github.com/repos/C3Junior/c3-web-next/assignees{/user}","branches_url":"https://api.github.com/repos/C3Junior/c3-web-next/branches{/branch}","tags_url":"https://api.github.com/repos/C3Junior/c3-web-next/tags","blobs_url":"https://api.github.com/repos/C3Junior/c3-web-next/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/C3Junior/c3-web-next/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/C3Junior/c3-web-next/git/refs{/sha}","trees_url":"https://api.github.com/repos/C3Junior/c3-web-next/git/trees{/sha}","statuses_url":"https://api.github.com/repos/C3Junior/c3-web-next/statuses/{sha}","languages_url":"https://api.github.com/repos/C3Junior/c3-web-next/languages","stargazers_url":"https://api.github.com/repos/C3Junior/c3-web-next/stargazers","contributors_url":"https://api.github.com/repos/C3Junior/c3-web-next/contributors","subscribers_url":"https://api.github.com/repos/C3Junior/c3-web-next/subscribers","subscription_url":"https://api.github.com/repos/C3Junior/c3-web-next/subscription","commits_url":"https://api.github.com/repos/C3Junior/c3-web-next/commits{/sha}","git_commits_url":"https://api.github.com/repos/C3Junior/c3-web-next/git/commits{/sha}","comments_url":"https://api.github.com/repos/C3Junior/c3-web-next/comments{/number}","issue_comment_url":"https://api.github.com/repos/C3Junior/c3-web-next/issues/comments{/number}","contents_url":"https://api.github.com/repos/C3Junior/c3-web-next/contents/{+path}","compare_url":"https://api.github.com/repos/C3Junior/c3-web-next/compare/{base}...{head}","merges_url":"https://api.github.com/repos/C3Junior/c3-web-next/merges","archive_url":"https://api.github.com/repos/C3Junior/c3-web-next/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/C3Junior/c3-web-next/downloads","issues_url":"https://api.github.com/repos/C3Junior/c3-web-next/issues{/number}","pulls_url":"https://api.github.com/repos/C3Junior/c3-web-next/pulls{/number}","milestones_url":"https://api.github.com/repos/C3Junior/c3-web-next/milestones{/number}","notifications_url":"https://api.github.com/repos/C3Junior/c3-web-next/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/C3Junior/c3-web-next/labels{/name}","releases_url":"https://api.github.com/repos/C3Junior/c3-web-next/releases{/id}","deployments_url":"https://api.github.com/repos/C3Junior/c3-web-next/deployments","created_at":"2015-09-18T16:47:58Z","updated_at":"2016-03-05T20:51:40Z","pushed_at":"2016-03-05T21:37:07Z","git_url":"git://github.com/C3Junior/c3-web-next.git","ssh_url":"git@github.com:C3Junior/c3-web-next.git","clone_url":"https://github.com/C3Junior/c3-web-next.git","svn_url":"https://github.com/C3Junior/c3-web-next","homepage":null,"size":219,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":1,"default_branch":"master"}},"base":{"label":"ajantis:master","ref":"master","sha":"798843512c7ecccba229d1cf1a0542dec6be66cc","user":{"login":"ajantis","id":852618,"avatar_url":"https://avatars.githubusercontent.com/u/852618?v=3","gravatar_id":"","url":"https://api.github.com/users/ajantis","html_url":"https://github.com/ajantis","followers_url":"https://api.github.com/users/ajantis/followers","following_url":"https://api.github.com/users/ajantis/following{/other_user}","gists_url":"https://api.github.com/users/ajantis/gists{/gist_id}","starred_url":"https://api.github.com/users/ajantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajantis/subscriptions","organizations_url":"https://api.github.com/users/ajantis/orgs","repos_url":"https://api.github.com/users/ajantis/repos","events_url":"https://api.github.com/users/ajantis/events{/privacy}","received_events_url":"https://api.github.com/users/ajantis/received_events","type":"User","site_admin":false},"repo":{"id":40572327,"name":"c3-web-next","full_name":"ajantis/c3-web-next","owner":{"login":"ajantis","id":852618,"avatar_url":"https://avatars.githubusercontent.com/u/852618?v=3","gravatar_id":"","url":"https://api.github.com/users/ajantis","html_url":"https://github.com/ajantis","followers_url":"https://api.github.com/users/ajantis/followers","following_url":"https://api.github.com/users/ajantis/following{/other_user}","gists_url":"https://api.github.com/users/ajantis/gists{/gist_id}","starred_url":"https://api.github.com/users/ajantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajantis/subscriptions","organizations_url":"https://api.github.com/users/ajantis/orgs","repos_url":"https://api.github.com/users/ajantis/repos","events_url":"https://api.github.com/users/ajantis/events{/privacy}","received_events_url":"https://api.github.com/users/ajantis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajantis/c3-web-next","description":"The next generation of C3 Web platform","fork":false,"url":"https://api.github.com/repos/ajantis/c3-web-next","forks_url":"https://api.github.com/repos/ajantis/c3-web-next/forks","keys_url":"https://api.github.com/repos/ajantis/c3-web-next/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajantis/c3-web-next/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajantis/c3-web-next/teams","hooks_url":"https://api.github.com/repos/ajantis/c3-web-next/hooks","issue_events_url":"https://api.github.com/repos/ajantis/c3-web-next/issues/events{/number}","events_url":"https://api.github.com/repos/ajantis/c3-web-next/events","assignees_url":"https://api.github.com/repos/ajantis/c3-web-next/assignees{/user}","branches_url":"https://api.github.com/repos/ajantis/c3-web-next/branches{/branch}","tags_url":"https://api.github.com/repos/ajantis/c3-web-next/tags","blobs_url":"https://api.github.com/repos/ajantis/c3-web-next/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajantis/c3-web-next/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajantis/c3-web-next/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajantis/c3-web-next/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajantis/c3-web-next/statuses/{sha}","languages_url":"https://api.github.com/repos/ajantis/c3-web-next/languages","stargazers_url":"https://api.github.com/repos/ajantis/c3-web-next/stargazers","contributors_url":"https://api.github.com/repos/ajantis/c3-web-next/contributors","subscribers_url":"https://api.github.com/repos/ajantis/c3-web-next/subscribers","subscription_url":"https://api.github.com/repos/ajantis/c3-web-next/subscription","commits_url":"https://api.github.com/repos/ajantis/c3-web-next/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajantis/c3-web-next/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajantis/c3-web-next/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajantis/c3-web-next/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajantis/c3-web-next/contents/{+path}","compare_url":"https://api.github.com/repos/ajantis/c3-web-next/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajantis/c3-web-next/merges","archive_url":"https://api.github.com/repos/ajantis/c3-web-next/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajantis/c3-web-next/downloads","issues_url":"https://api.github.com/repos/ajantis/c3-web-next/issues{/number}","pulls_url":"https://api.github.com/repos/ajantis/c3-web-next/pulls{/number}","milestones_url":"https://api.github.com/repos/ajantis/c3-web-next/milestones{/number}","notifications_url":"https://api.github.com/repos/ajantis/c3-web-next/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajantis/c3-web-next/labels{/name}","releases_url":"https://api.github.com/repos/ajantis/c3-web-next/releases{/id}","deployments_url":"https://api.github.com/repos/ajantis/c3-web-next/deployments","created_at":"2015-08-12T00:51:08Z","updated_at":"2015-08-12T01:00:31Z","pushed_at":"2016-03-05T21:37:07Z","git_url":"git://github.com/ajantis/c3-web-next.git","ssh_url":"git@github.com:ajantis/c3-web-next.git","clone_url":"https://github.com/ajantis/c3-web-next.git","svn_url":"https://github.com/ajantis/c3-web-next","homepage":null,"size":194,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ajantis/c3-web-next/pulls/2"},"html":{"href":"https://github.com/ajantis/c3-web-next/pull/2"},"issue":{"href":"https://api.github.com/repos/ajantis/c3-web-next/issues/2"},"comments":{"href":"https://api.github.com/repos/ajantis/c3-web-next/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ajantis/c3-web-next/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ajantis/c3-web-next/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ajantis/c3-web-next/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ajantis/c3-web-next/statuses/4f3a1cf1a118002ad2b7e9e65b0f9e9633d6f999"}}}}