applicake/doorkeeper — pull request #34 by GoldsteinTechPartners (2012-01-10 04:34:46+00:00)
Title: Add support for custom unauthorized responses in the case of OAuth rejec...

...tion, not just a 401 head response

This patch allows controllers for protected resources to customize their response when the request is unauthorized, as opposed to always returning a bare 401 response. For example, a JSON based API might want to return an error message in the JSON body along with the 401 status code. This patch allows such customization.