[wp-trac] [WordPress Trac] #51748: Allow customization of permission_callback errors
WordPress Trac
noreply at wordpress.org
Tue Nov 10 16:13:57 UTC 2020
#51748: Allow customization of permission_callback errors
-------------------------+------------------------------
Reporter: plucmtl | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+------------------------------
Comment (by plucmtl):
The use case is when building an API that's integrated with WordPress'
REST API but doesn't necessarily have to do with WordPress. What I'm
currently doing is allowing users to authenticate to our custom API
namespace using API Keys and Tokens stored in their usermeta. I'm doing
this because we are shifting our previous, custom API to integrate with
WordPress - but in order to do that without changing our mobile client, we
need to be able to control how the errors are output so that they can be
processed, without format changes, by the client. I would argue that if
you can control the success output, you should be able to control the
error output as well.
Thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51748#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list