When the access request header contains an expired Authorization and accesses a URL that does not exist, it should output a 404 error, but now it is outputting a 401 error.
Issue fork simple_oauth-3518947
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
bojan_dev commentedI tested how Basic Auth does this, and a non existing URL will get 404 even if the credentials are incorrect, so I think it's a valid point. Please review the MR !185, it does not apply OAuth2 anymore if the URL is not valid.
Comment #6
bojan_dev commentedComment #9
bojan_dev commentedIt appears there are cases where a route is not available, but OAuth2 still needs to be applied (see #3552854: REST routes broken again and #3547975: REST routes crashing, claiming unsupported format).
When comparing this with Basic Auth, the authenticate method returns NULL when the credentials are incorrect. However, in the simple_oauth case, it throws exceptions in different cases, which is relevant for interpretation by the requester. Marking this as won’t fix for now and reverted the MR.