I'm not sure if it helps, but Bill answered this recently here http://lists.jboss.org/pipermail/keycloak-user/2016-February/004890.html

On Thu, Feb 18, 2016 at 5:12 PM Jeremy Simon <jeremy@jeremysimon.com> wrote:
Hi All,

What is the best way to go about writing a custom protocol mapper?  I
hadn't seen any documentation for it.

Basically I was thinking about grabbing some multivalued attribute on
the userdetails object and mushing it into a CSV string for a SAML
attribute.

jeremy
jeremy@jeremysimon.com
www.JeremySimon.com
_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user