Split reasons for unauthorized access

Issue #41 new
Dan created an issue

Situation

The package returns one error messages for all unauthorized access. This makes it hard to for developers to suggest API consumer how to solve the problem (or even tell the actual reason for the failed request).

Feature Request

Split the error message into to two causes:

  • The endpoint is access protected, but no matching authorization method was provided by the client

    • Eg. Missing API key, no active frontend user login
  • The endpoint is access protected, but the authorization method provided by the client is not valid

    • Eg. Wrong key format, key discarded, wrong IP, unxpected frontend user etc.

Comments (0)

  1. Log in to comment