{"action":"created","issue":{"url":"https://api.github.com/repos/http4s/http4s/issues/264","labels_url":"https://api.github.com/repos/http4s/http4s/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/http4s/http4s/issues/264/comments","events_url":"https://api.github.com/repos/http4s/http4s/issues/264/events","html_url":"https://github.com/http4s/http4s/pull/264","id":74063601,"number":264,"title":"Topic/authorization","user":{"login":"bryce-anderson","id":2948506,"avatar_url":"https://avatars.githubusercontent.com/u/2948506?v=3","gravatar_id":"","url":"https://api.github.com/users/bryce-anderson","html_url":"https://github.com/bryce-anderson","followers_url":"https://api.github.com/users/bryce-anderson/followers","following_url":"https://api.github.com/users/bryce-anderson/following{/other_user}","gists_url":"https://api.github.com/users/bryce-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/bryce-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryce-anderson/subscriptions","organizations_url":"https://api.github.com/users/bryce-anderson/orgs","repos_url":"https://api.github.com/users/bryce-anderson/repos","events_url":"https://api.github.com/users/bryce-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/bryce-anderson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-05-07T17:27:15Z","updated_at":"2015-05-29T15:51:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/http4s/http4s/pulls/264","html_url":"https://github.com/http4s/http4s/pull/264","diff_url":"https://github.com/http4s/http4s/pull/264.diff","patch_url":"https://github.com/http4s/http4s/pull/264.patch"},"body":"This is a continuation of PR #258 submitted by @frehn. I think its good to go but needs a broader review.\r\n\r\nSome possible points of interest:\r\n* The action of this as a middleware is troubling because of the type signature of our ```HttpService```, namely ```Request => Task[Option[Response]]```. Namely, if you ```orElse``` another route behind a service that has been wrapped by the authentication middleware, you must still authenticate. If we change the signature back to ```Request => Task[Option[Response]]``` we can query if the route exists and then attempt authentication, otherwise move on.\r\n* By using a ```LinkedHashMap``` cleanup operations should be pretty cheap so I wonder if it would be worth it to just do cleanup every time a nonce is created and or queried.\r\n\r\nA big thanks to @frehn, he did the vast majority of the work here including the great documentation this PR enjoys."},"comment":{"url":"https://api.github.com/repos/http4s/http4s/issues/comments/106854378","html_url":"https://github.com/http4s/http4s/pull/264#issuecomment-106854378","issue_url":"https://api.github.com/repos/http4s/http4s/issues/264","id":106854378,"user":{"login":"kaiserpelagic","id":1222541,"avatar_url":"https://avatars.githubusercontent.com/u/1222541?v=3","gravatar_id":"","url":"https://api.github.com/users/kaiserpelagic","html_url":"https://github.com/kaiserpelagic","followers_url":"https://api.github.com/users/kaiserpelagic/followers","following_url":"https://api.github.com/users/kaiserpelagic/following{/other_user}","gists_url":"https://api.github.com/users/kaiserpelagic/gists{/gist_id}","starred_url":"https://api.github.com/users/kaiserpelagic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaiserpelagic/subscriptions","organizations_url":"https://api.github.com/users/kaiserpelagic/orgs","repos_url":"https://api.github.com/users/kaiserpelagic/repos","events_url":"https://api.github.com/users/kaiserpelagic/events{/privacy}","received_events_url":"https://api.github.com/users/kaiserpelagic/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T15:51:09Z","updated_at":"2015-05-29T15:51:09Z","body":"@frehn looks great. I think this is a good approach."}}