Can you change the 401 error response?
<p>My question is, can you change the structure of the response of the 401 error message?</p>

<pre><code>{
    "error": "unauthorized",
    "error_description": "No AuthenticationProvider found for org.springframework.security.authentication.UsernamePasswordAuthenticationToken"
}
</code></pre>

<p>for example </p>

<pre><code>{
    "timestamp" : 123124354,
    "status" : 401,
    "message" : "The username or password are not valid!"
}
</code></pre>