{"action":"created","issue":{"url":"https://api.github.com/repos/haskell-servant/servant/issues/70","labels_url":"https://api.github.com/repos/haskell-servant/servant/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/haskell-servant/servant/issues/70/comments","events_url":"https://api.github.com/repos/haskell-servant/servant/issues/70/events","html_url":"https://github.com/haskell-servant/servant/issues/70","id":75313496,"number":70,"title":"Authentication","user":{"login":"aaronlevin","id":1580060,"avatar_url":"https://avatars.githubusercontent.com/u/1580060?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlevin","html_url":"https://github.com/aaronlevin","followers_url":"https://api.github.com/users/aaronlevin/followers","following_url":"https://api.github.com/users/aaronlevin/following{/other_user}","gists_url":"https://api.github.com/users/aaronlevin/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlevin/subscriptions","organizations_url":"https://api.github.com/users/aaronlevin/orgs","repos_url":"https://api.github.com/users/aaronlevin/repos","events_url":"https://api.github.com/users/aaronlevin/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlevin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell-servant/servant/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/haskell-servant/servant/labels/rfc","name":"rfc","color":"e11d21"},{"url":"https://api.github.com/repos/haskell-servant/servant/labels/servant-server","name":"servant-server","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":72,"created_at":"2015-05-11T18:24:51Z","updated_at":"2015-09-01T09:54:08Z","closed_at":null,"body":"Hi everyone! \r\n\r\nI thought I'd open up an issue to act as a container for authentication-related discussion. The issue will be considered *closed* when the first iteration of authentication has been implemented, at which point further improvements will have their own issues. \r\n\r\n## Authentication\r\n\r\nWe want to support various types of authentication for http servers and clients:\r\n\r\n- Basic authentication\r\n- Digest authentication\r\n- Cookie-based authentication\r\n- Token-based authentication (for [OAuth 1.0](http://oauth.net/core/1.0/), [OAuth 2.0](http://tools.ietf.org/html/rfc6749), [Amazon HMAC-style](http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html), and any others)\r\n\r\nFurther, we want to account for the following (not a total list):\r\n\r\n- maintain type-safety as per servant's design goals, but also allow for flexibility of various authentication methods and protocols (both standardized and not standardized).\r\n- per-[`realm`](https://tools.ietf.org/html/rfc2617) authentication\r\n- per-endpoint or site-wide authentication\r\n\r\nOut of scope for this iteration (but worth thinking about):\r\n\r\n- role-based authentication\r\n\r\nReferences:\r\n\r\n- example [cookie-based authenatication](https://github.com/haskell-servant/HaskellSGMeetup2015/blob/master/examples/authentication-combinator/AuthenticationCombinator.hs) in servant.\r\n\r\nI welcome any thoughts, ideas, or suggestions! I will be creating an `auth` branch to feature work and will let everyone know when that's done."},"comment":{"url":"https://api.github.com/repos/haskell-servant/servant/issues/comments/136657380","html_url":"https://github.com/haskell-servant/servant/issues/70#issuecomment-136657380","issue_url":"https://api.github.com/repos/haskell-servant/servant/issues/70","id":136657380,"user":{"login":"lunaris","id":163793,"avatar_url":"https://avatars.githubusercontent.com/u/163793?v=3","gravatar_id":"","url":"https://api.github.com/users/lunaris","html_url":"https://github.com/lunaris","followers_url":"https://api.github.com/users/lunaris/followers","following_url":"https://api.github.com/users/lunaris/following{/other_user}","gists_url":"https://api.github.com/users/lunaris/gists{/gist_id}","starred_url":"https://api.github.com/users/lunaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunaris/subscriptions","organizations_url":"https://api.github.com/users/lunaris/orgs","repos_url":"https://api.github.com/users/lunaris/repos","events_url":"https://api.github.com/users/lunaris/events{/privacy}","received_events_url":"https://api.github.com/users/lunaris/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T09:54:08Z","updated_at":"2015-09-01T09:54:08Z","body":"I've been searching for a solution to this over the last few days, and am therefore super late to this party, but I wanted to put forward an idea I've had about how this might be tackled (or getting things from the request in general, such as JWTs, basic authentication headers etc.). I've put a Gist up at https://gist.github.com/lunaris/a239c234c4700136dd14, which probably does a terrible job of explaining it but maybe illustrates what I'm going for. Apologies if it is indeed too late to float this (I know there's a PR open) -- I just sense we might be able to tackle something bigger than authentication here."}}