[keycloak-user] Direct Grant and OAuth 2.0 error response

Fabricio Milone fabricio.milone at shinetech.com
Wed Jan 27 18:59:48 EST 2016


Hi,

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.

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).

This is my architecture:

Mobile client ---direct access grant---> Keycloak -------validateUser---->
Federator

If Error
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).


Can someone please give me a hint on this? Is there any other
(better/cleaner) way to do this?

Thanks in advance!

-- 
*Fabricio Milone*
Developer

*Shine Consulting *

30/600 Bourke Street

Melbourne VIC 3000

T: 03 8488 9939

M: 04 3200 4006


www.shinetech.com  *a* passion for excellence
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160128/cbe5fbb3/attachment.html 


More information about the keycloak-user mailing list