Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buddy.auth.backends.token/handle-unauthorized-default violates RFC 7235 section 4.1. WWW-Authenticate #83

Open
sorsasampo opened this issue Mar 6, 2019 · 0 comments

Comments

@sorsasampo
Copy link

RFC 7235 section 4.1. WWW-Authenticate specifies:

A server generating a 401 (Unauthorized) response MUST send a WWW-Authenticate header field containing at least one challenge.

However, buddy.auth.backends.token/handle-unauthorized-default sends a 401 status response without a WWW-Authenticate header:

(defn- handle-unauthorized-default
"A default response constructor for an unauthorized request."
[request]
(if (authenticated? request)
{:status 403 :headers {} :body "Permission denied"}
{:status 401 :headers {} :body "Unauthorized"}))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant