<div dir="ltr">Hello,<div><br></div><div>I am trying to implement POC with keycloak as auth* server.</div><div><br></div><div>Here is my set up / use case:</div><div><ul><li>Tomcat server with keycloak adapter<br></li><li>Web app with a URL <i><a href="http://x.y/app/secure">http://x.y/app/secure</a></i> protected by a security constraint.<br></li><li>An unauthenticated user goes to the URL and gets redirected by the adapter to the keycloak login page.<br></li><li>The user clicks Cancel button and gets redirected back to the URL with parameters ?error=access_denied&amp;state=1%2Fxxxx<br></li><li>This redirect is intercepted by the adapter and user&#39;s browser gets 400 error from the adapter. My application never receives the request.<br></li></ul></div><div>So my questions are: <br></div><div><br></div><div>1. Is this correct description of what&#39;s going on or am I missing something?</div><div><br></div><div>2. If this is the behavior by design wouldn&#39;t it be better instead of the 400 error to redirect user to some themed page on the keycloak server with a nice explanation, like &quot;We&#39;re sorry, but you cannot access this resource without authentication, blablabla &quot;</div><div><br></div><div>Thank you,</div><div>Roman Usatenko.</div><div><br></div><div><br></div></div>