Make WordPress Core

Opened 3 months ago

Last modified 2 months ago

#46907 new enhancement

Pass current request object to rest_authentication_errors filter

Reported by: ocean90 Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch
Focuses: rest-api Cc:


If you hook into rest_authentication_errors and need to check the used route or method you currently have to do the same handling which WP_REST_Server::serve_request() has already done before WP_REST_Server::check_authentication() is called.
To avoid this I'm proposing to pass $request as a parameter to WP_REST_Server::check_authentication() and the rest_authentication_errors filter.

Attachments (1)

46907.diff (1.8 KB) - added by ocean90 3 months ago.

Download all attachments as: .zip

Change History (3)

3 months ago

This ticket was mentioned in Slack in #core-restapi by ocean90. View the logs.

3 months ago

This ticket was mentioned in Slack in #core-restapi by espellcaste. View the logs.

2 months ago

Note: See TracTickets for help on using tickets.