<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Maybe you can achieve this by override
authentication flow for "direct access grants" and plug your own
authenticators. Your authenticator will catch the exception thrown
by your UserFederationProvider and send some response
corresponding to that. See docs for Authentication SPI for more
details.<br>
<br>
Marek<br>
<br>
On 28/01/16 00:59, Fabricio Milone wrote:<br>
</div>
<blockquote
cite="mid:CAOjtoUOJRveq-=eztOwq9mPhuNYkkG1mwMYgzXZwGv1uwSjHzg@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</body>
</html>