Closed GaetanOclock closed 2 years ago
Actually this issue seems fixed in the Github current version (with a code 401
though, which seems strange to me), but not in the version i got when downloading the plugin with Composer from wpackagist :thinking:
Both sources are tagged with 2.1.0
version.
Current behavior : When using a protected route, if no Authorization header is passed, we get a success response with code 200 with an error body :
Expected behavior : When using a protected route, if no Authorization header is passed, we should get an error with a 403 HTTP Status code.
Fix : Use the second constructor argument when instanciating
WP_REST_Response()
inclass-auth.php
at line293
to send an actual 403 Response.