{"action":"created","issue":{"url":"https://api.github.com/repos/ueberauth/guardian/issues/309","repository_url":"https://api.github.com/repos/ueberauth/guardian","labels_url":"https://api.github.com/repos/ueberauth/guardian/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/ueberauth/guardian/issues/309/comments","events_url":"https://api.github.com/repos/ueberauth/guardian/issues/309/events","html_url":"https://github.com/ueberauth/guardian/issues/309","id":230773061,"number":309,"title":"V1 - Plugs","user":{"login":"hassox","id":104,"avatar_url":"https://avatars3.githubusercontent.com/u/104?v=3","gravatar_id":"","url":"https://api.github.com/users/hassox","html_url":"https://github.com/hassox","followers_url":"https://api.github.com/users/hassox/followers","following_url":"https://api.github.com/users/hassox/following{/other_user}","gists_url":"https://api.github.com/users/hassox/gists{/gist_id}","starred_url":"https://api.github.com/users/hassox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hassox/subscriptions","organizations_url":"https://api.github.com/users/hassox/orgs","repos_url":"https://api.github.com/users/hassox/repos","events_url":"https://api.github.com/users/hassox/events{/privacy}","received_events_url":"https://api.github.com/users/hassox/received_events","type":"User","site_admin":false},"labels":[{"id":225298407,"url":"https://api.github.com/repos/ueberauth/guardian/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":225298410,"url":"https://api.github.com/repos/ueberauth/guardian/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-23T16:40:18Z","updated_at":"2017-05-26T16:17:19Z","closed_at":null,"body":"We need the plugs to come over to the v1 structure. \r\n\r\nThere is an opportunity here to do things a little differently to pre-1.0\r\n\r\nAll plugs should accept options for the `key` position of the credentials but also the current requirement for `handler` seems a bit heavy handed especially with the advent of the FallbackController.\r\n\r\nHaving a whole bunch of different callbacks to implement also seems a bit weird. Each plug requiring it's own callback seems a bit un-elixir. What would you folks think of a single function on the handler of\r\n\r\n`def auth_error(conn, kind, options)`\r\n\r\nWhere kind is the kind of failure.\r\n"},"comment":{"url":"https://api.github.com/repos/ueberauth/guardian/issues/comments/304324802","html_url":"https://github.com/ueberauth/guardian/issues/309#issuecomment-304324802","issue_url":"https://api.github.com/repos/ueberauth/guardian/issues/309","id":304324802,"user":{"login":"hassox","id":104,"avatar_url":"https://avatars3.githubusercontent.com/u/104?v=3","gravatar_id":"","url":"https://api.github.com/users/hassox","html_url":"https://github.com/hassox","followers_url":"https://api.github.com/users/hassox/followers","following_url":"https://api.github.com/users/hassox/following{/other_user}","gists_url":"https://api.github.com/users/hassox/gists{/gist_id}","starred_url":"https://api.github.com/users/hassox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hassox/subscriptions","organizations_url":"https://api.github.com/users/hassox/orgs","repos_url":"https://api.github.com/users/hassox/repos","events_url":"https://api.github.com/users/hassox/events{/privacy}","received_events_url":"https://api.github.com/users/hassox/received_events","type":"User","site_admin":false},"created_at":"2017-05-26T16:17:19Z","updated_at":"2017-05-26T16:17:19Z","body":"Another alternative from @scrogson \r\n\r\n```elixir\r\n# Before anything else\r\n\r\nplug MyApp.Tokens.Plug, error_handler: MyApp.AuthErrorHandler # error_handler is optional\r\n\r\n### then continue to build your pipeline\r\nplug Guardian.Plug.VerifySession, claims: %{\"typ\" => \"access\"}\r\nplug Guardian.Plug.VerifyHeader, claims: %{\"typ\" => \"access\"}, realm: \"Bearer\"\r\nplug Guardian.Plug.EnsureAuthenticated\r\nplug Guardian.Plug.LoadResource, allow_blank: false\r\n```\r\n"}}
{"actor":{"display_login":"hassox"}}