<div dir="ltr">Hi,<div><br></div><div>I have a direct grant flow working correctly and returning all the information I need using Mappers when the response is OK. However, I would like to include more information in the error response when my Federator doesn't authenticate the username, specifically, my own federator's error codes/messages.</div><div><br></div><div>I've been reading the RFC and there is a parameter called error_description in the error response, but not sure how to add a json there (it is supported by the USASCII chars, afaik).</div><div><br></div><div>This is my architecture:</div><div><br></div><div>Mobile client ---direct access grant---> Keycloak -------validateUser----> Federator</div><div><br></div><div>If Error</div><div>Federator ----response---> MyFederatorProvider (on validate() method, parse the response and somehow include the error coming from the federator inside the error_description field of the standard OAuth 2.0 response).<br></div><div><br></div><div><br></div><div>Can someone please give me a hint on this? Is there any other (better/cleaner) way to do this?</div><div><br></div><div>Thanks in advance!<br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:12.8px;font-family:Verdana,Arial,Helvetica,sans-serif"><b><font color="#000000">Fabricio Milone</font></b></span></div><div><span style="font-size:12.8px;font-family:Verdana,Arial,Helvetica,sans-serif"><font color="#000000">Developer</font></span></div><span style="font-size:12.8px;font-family:Verdana,Arial,Helvetica,sans-serif"><b><font color="#009900"><div><span style="font-size:12.8px;font-family:Verdana,Arial,Helvetica,sans-serif"><b><font color="#009900"><br></font></b></span></div>Shine Consulting </font></b></span><span style="font-size:12.8px;font-family:Verdana,Arial,Helvetica,sans-serif"><p style="font-size:13.3px;color:rgb(0,153,0);margin:0pt"><span style="color:rgb(0,0,0)">30/600 Bourke Street</span></p><p style="font-size:13.3px;color:rgb(0,153,0);margin:0pt"><span style="color:rgb(0,0,0)">Melbourne VIC 3000</span></p><p style="font-size:13.3px;color:rgb(0,153,0);margin:0pt"><span style="color:rgb(0,0,0)">T: 03 8488 9939</span></p><p style="font-size:13.3px;color:rgb(0,153,0);margin:0pt"><span style="color:rgb(0,0,0)">M: 04 3200 4006</span></p><p style="font-size:13.3px;color:rgb(0,153,0);margin:0pt"><span style="color:rgb(0,0,0)"><br></span></p></span><span style="font-size:13.3px;font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-size:13.3px"><p style="margin:0pt"><a href="http://www.shinetech.com/" style="color:rgb(51,51,51)" target="_blank">www.shinetech.com</a><font color="#333333"> </font><i style="color:rgb(51,51,51)"><b>a</b></i><font color="#333333"> passion for excellence</font></p></span></span></div></div>
</div></div>