{"action":"created","issue":{"url":"https://api.github.com/repos/rbishop/plug_basic_auth/issues/12","labels_url":"https://api.github.com/repos/rbishop/plug_basic_auth/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/rbishop/plug_basic_auth/issues/12/comments","events_url":"https://api.github.com/repos/rbishop/plug_basic_auth/issues/12/events","html_url":"https://github.com/rbishop/plug_basic_auth/issues/12","id":115633453,"number":12,"title":"Proposal: Add callback to determine whether the authentication is successful or not","user":{"login":"amilkr","id":180107,"avatar_url":"https://avatars.githubusercontent.com/u/180107?v=3","gravatar_id":"","url":"https://api.github.com/users/amilkr","html_url":"https://github.com/amilkr","followers_url":"https://api.github.com/users/amilkr/followers","following_url":"https://api.github.com/users/amilkr/following{/other_user}","gists_url":"https://api.github.com/users/amilkr/gists{/gist_id}","starred_url":"https://api.github.com/users/amilkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amilkr/subscriptions","organizations_url":"https://api.github.com/users/amilkr/orgs","repos_url":"https://api.github.com/users/amilkr/repos","events_url":"https://api.github.com/users/amilkr/events{/privacy}","received_events_url":"https://api.github.com/users/amilkr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-07T04:48:13Z","updated_at":"2015-11-26T13:56:27Z","closed_at":null,"body":"Hi guys, \r\nA couple of weeks ago I needed a plug to add basic auth.\r\nIn my case, to determine if the authentication is successful I have to check the database. So that, I ended up forking this repo and updating it to be able to add a callback function which is going to be called by the plug to validate the auth. \r\n[This commit](https://github.com/amilkr/plug_basic_auth/commit/e3496394de1b211c6f3312eac66f95de274b6ea3) has my changes. \r\n\r\nWhat do you think about it? Would you consider to add this callback? \r\nI could create a PR from my branch. I deleted the `:username` and `:password` keys and their implementation. I could update my code to support both strategies: validation callback and username/password.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/rbishop/plug_basic_auth/issues/comments/159921835","html_url":"https://github.com/rbishop/plug_basic_auth/issues/12#issuecomment-159921835","issue_url":"https://api.github.com/repos/rbishop/plug_basic_auth/issues/12","id":159921835,"user":{"login":"rbishop","id":982936,"avatar_url":"https://avatars.githubusercontent.com/u/982936?v=3","gravatar_id":"","url":"https://api.github.com/users/rbishop","html_url":"https://github.com/rbishop","followers_url":"https://api.github.com/users/rbishop/followers","following_url":"https://api.github.com/users/rbishop/following{/other_user}","gists_url":"https://api.github.com/users/rbishop/gists{/gist_id}","starred_url":"https://api.github.com/users/rbishop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbishop/subscriptions","organizations_url":"https://api.github.com/users/rbishop/orgs","repos_url":"https://api.github.com/users/rbishop/repos","events_url":"https://api.github.com/users/rbishop/events{/privacy}","received_events_url":"https://api.github.com/users/rbishop/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T13:56:27Z","updated_at":"2015-11-26T13:56:27Z","body":"Sorry for the delay in getting back tot his. This is the second or third time I'm getting this request so I would be open to it. If you have some code to share please do! This is alsoi similar to what #13 is asking for and we can accomplish both at the same time."}}