Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitLab with WP-CLI:
wp plugin install https://gitlab.com/dkzr-wordpress/plugins/dkzr-add-auth-to-api-users-endpoint/-/archive/main/dkzr-add-auth-to-api-users-endpoint-main.zipUpdates itself. It ships its own updater (Update URI header), so new versions appear under Dashboard → Updates.
WordPress plugin to add authorization to WP-API /wp/v2/users endpoints
By default, all /wp/v2/users endpoints are readable for all, this plugin adds a is_user_logged_in() check to these endpoints.