Skip to content
New issue

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

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

Already on GitHub? # to your account

Differentiate between HTTP 401 and 403 responses #24

Open
ikattey opened this issue Oct 19, 2024 · 0 comments
Open

Differentiate between HTTP 401 and 403 responses #24

ikattey opened this issue Oct 19, 2024 · 0 comments

Comments

@ikattey
Copy link

ikattey commented Oct 19, 2024

The current implementation does not differentiate between HTTP 401 Unauthorized and HTTP 403 Forbidden responses.

At the moment, a HTTP 401 response is returned during request validation – regardless of whether the issue is related to authentication (missing / invalid credentials) or authorisation (missing required permissions / scopes).

This does not align with standard HTTP response code usage and could be improved.

Expected Behaviour

It should be possible to differentiate error responses based on the nature of the security failure:

  • HTTP 401 Unauthorized should be returned for missing or invalid authentication credentials.
  • HTTP 403 Forbidden should be returned for authenticated users lacking the necessary permissions or scopes.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant