{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/hapi-auth-basic/issues/31","labels_url":"https://api.github.com/repos/hapijs/hapi-auth-basic/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/hapi-auth-basic/issues/31/comments","events_url":"https://api.github.com/repos/hapijs/hapi-auth-basic/issues/31/events","html_url":"https://github.com/hapijs/hapi-auth-basic/issues/31","id":71101780,"number":31,"title":"Provide unauthorized Status code when error occured","user":{"login":"KeKs0r","id":2970814,"avatar_url":"https://avatars.githubusercontent.com/u/2970814?v=3","gravatar_id":"","url":"https://api.github.com/users/KeKs0r","html_url":"https://github.com/KeKs0r","followers_url":"https://api.github.com/users/KeKs0r/followers","following_url":"https://api.github.com/users/KeKs0r/following{/other_user}","gists_url":"https://api.github.com/users/KeKs0r/gists{/gist_id}","starred_url":"https://api.github.com/users/KeKs0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeKs0r/subscriptions","organizations_url":"https://api.github.com/users/KeKs0r/orgs","repos_url":"https://api.github.com/users/KeKs0r/repos","events_url":"https://api.github.com/users/KeKs0r/events{/privacy}","received_events_url":"https://api.github.com/users/KeKs0r/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hapijs/hapi-auth-basic/labels/non-issue","name":"non-issue","color":"c7def8"}],"state":"closed","locked":false,"assignee":{"login":"hueniverse","id":56631,"avatar_url":"https://avatars.githubusercontent.com/u/56631?v=3","gravatar_id":"","url":"https://api.github.com/users/hueniverse","html_url":"https://github.com/hueniverse","followers_url":"https://api.github.com/users/hueniverse/followers","following_url":"https://api.github.com/users/hueniverse/following{/other_user}","gists_url":"https://api.github.com/users/hueniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/hueniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hueniverse/subscriptions","organizations_url":"https://api.github.com/users/hueniverse/orgs","repos_url":"https://api.github.com/users/hueniverse/repos","events_url":"https://api.github.com/users/hueniverse/events{/privacy}","received_events_url":"https://api.github.com/users/hueniverse/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-04-26T18:20:16Z","updated_at":"2015-06-15T07:25:36Z","closed_at":"2015-06-13T17:23:20Z","body":"I was testing this and was confused that when an error is provided to the validateFunc callback, that the status code is 200.\r\n\r\nThis stems from\r\nhttps://github.com/hapijs/hapi-auth-basic/blob/master/lib/index.js#L68\r\n\r\nI feel that when the authentication failed, it should always return an unauthorized Status code. Or am I missing something? What is the background for providing the error with a 200 Status code?"},"comment":{"url":"https://api.github.com/repos/hapijs/hapi-auth-basic/issues/comments/111965533","html_url":"https://github.com/hapijs/hapi-auth-basic/issues/31#issuecomment-111965533","issue_url":"https://api.github.com/repos/hapijs/hapi-auth-basic/issues/31","id":111965533,"user":{"login":"hueniverse","id":56631,"avatar_url":"https://avatars.githubusercontent.com/u/56631?v=3","gravatar_id":"","url":"https://api.github.com/users/hueniverse","html_url":"https://github.com/hueniverse","followers_url":"https://api.github.com/users/hueniverse/followers","following_url":"https://api.github.com/users/hueniverse/following{/other_user}","gists_url":"https://api.github.com/users/hueniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/hueniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hueniverse/subscriptions","organizations_url":"https://api.github.com/users/hueniverse/orgs","repos_url":"https://api.github.com/users/hueniverse/repos","events_url":"https://api.github.com/users/hueniverse/events{/privacy}","received_events_url":"https://api.github.com/users/hueniverse/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T07:25:36Z","updated_at":"2015-06-15T07:25:36Z","body":"Doesn't look like you are setting the strategy as default in this code."}}