Basic does not show up as a valid authentication method (or work)
I've installed and activated WP-API (v2) and Basic-Auth plugin, however, "Basic" does not appear in the list of authentication methods when querying /wp-json.
...
"namespaces": [
"wp/v2",
"oembed/1.0"
],
"authentication": [],
"routes": {
"/": {
...
If I install the OAuth plugin, the method does appear:
...
"namespaces": [
"wp/v2",
"oembed/1.0"
],
"authentication": {
"oauth1": {
"request": "http://www.crucibleradio.com/oauth1/request",
"authorize": "http://www.crucibleradio.com/oauth1/authorize",
"access": "http://www.crucibleradio.com/oauth1/access",
"version": "0.1"
}
},
"routes": {
"/": {
...
For any request I make using the Basic authentication method, I get a permissions error:
{
"code": "rest_cannot_edit",
"message": "Sorry, you are not allowed to update this post.",
"data": {
"status": 401
}
}
What causes an authentication method to become "registered" with WP-API and show up in that list? Does "Basic" appear as an item in the authentication methods in a working installation?
+1
+1
This might help someone coming across this ticket:
As a user with a working installation, I can confirm that "Basic" does NOT appear as an item in the listed authentication methods:
...
"namespaces": [
"oembed/1.0",
"2fa/v1",
"wp-rest-api-log",
"acf/v3",
"wp/v2"
],
"authentication": [],
"routes": {
"/": {
"namespace": "",
"methods": [
"GET"
],
"endpoints":
...