Configure user token access in the server, and enable "Require user tokens for repository authentication". Then run a Maven build against the server against a repository that allows anonymous read access.
The build will fail, a 401 response is sent.
The "Require user tokens for repository authentication" feature should not block anonymous requests. It should only block requests that are sent with credentials that are not user tokens.