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

Which WWW-Authenticate header to use? #32

Open
sebsel opened this issue Jun 6, 2019 · 1 comment
Open

Which WWW-Authenticate header to use? #32

sebsel opened this issue Jun 6, 2019 · 1 comment

Comments

@sebsel
Copy link
Member

sebsel commented Jun 6, 2019

The spec states the following:

If the token is not valid, the endpoint MUST return an appropriate HTTP 400, 401 or 403 response. The response body is not significant.

Then, for a 401, we should also add a WWW-Authenticate header:

The 401 (Unauthorized) response message is used by an origin server
to challenge the authorization of a user agent. This response MUST
include a WWW-Authenticate header field containing at least one
challenge applicable to the requested resource. [source]

What kind of challenge should that be? Is the header WWW-Authenticate: IndieAuth acceptable, should it be WWW-Authenticate: Bearer, or something different?

@Zegnat
Copy link
Member

Zegnat commented Jun 8, 2019

Because the token endpoint part of the flow seems to solely use Bearer tokens and rely a lot on core OAuth 2.0 mechanics (e.g. revocation is basically RFC 7009 without modifications), I went with RFC 6750 error responses for Mintoken. Those all use WWW-Authenticate: Bearer.

The AutoAuth draft also went with WWW-Authenticate: Bearer, although I forget the rationale behind that. @sknebel mind commenting?

That said it may be nice to get some examples and/or clarifications about error responses in the IndieAuth spec. As I still have questions.

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

No branches or pull requests

2 participants