Then the REST route "/wp/v2/users/me" should require authentication

Assert a REST route asks for authentication, or does not: it answers a visitor with 401 (or 403) when it does. It is the check that private routes, such as the current user and the settings, stay private.

Examples

Then the REST route "/wp/v2/users/me" should require authentication
And the REST route "/wp/v2/settings" should require authentication
Then the REST route "/wp/v2/posts" should not require authentication
And the REST route "/wp/v2/posts?status=draft" should require authentication
But the REST route "/wp/v2/pages" should not require authentication

Pattern

Then(/^the REST route "([^"]*)" should( not)* require authentication$/, …)

Part of @webship-js/wordpress-steps (github.com/webship/wordpress-steps), a step pack for Webship-js 2.0.x.