<div dir="ltr">By mapper fields do you mean claims in the token? If so you can get them from keycloak.tokenParsed (see <a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/ch08.html#javascript-adapter">http://keycloak.github.io/docs/userguide/keycloak-server/html/ch08.html#javascript-adapter</a>)</div><div class="gmail_extra"><br><div class="gmail_quote">On 2 November 2015 at 07:13, harsh mahey <span dir="ltr">&lt;<a href="mailto:harshmahey@gmail.com" target="_blank">harshmahey@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks a lot !<div>It worked...is there some good documentation where i can see how can i get the Mapper fields in my application.I am using angularjs.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 10:31 PM, Nic Grange <span dir="ltr">&lt;<a href="mailto:nicolas.grange@retrievercommunications.com" target="_blank">nicolas.grange@retrievercommunications.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Harsh,<br>
<br>
Your problem is most likely caused by duplicate security-constraints for the same url-pattern (/*).<br>
This used to be in one of the older versions of the documentation but was updated with <a href="https://issues.jboss.org/browse/KEYCLOAK-1724" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-1724</a>.<br>
Try just removing the second &lt;security-constraint&gt; in your web.xml and retest to see if it is the problem.<br>
<br>
Cheers,<br>
Nic<br>
<br>
<br>
&gt;<br>
&gt;Message: 4<br>
&gt;Date: Sun, 1 Nov 2015 21:12:23 -0700<br>
&gt;From: harsh mahey &lt;<a href="mailto:harshmahey@gmail.com" target="_blank">harshmahey@gmail.com</a>&gt;<br>
&gt;Subject: [keycloak-user] Issue with Tomcat 8 adapter ?<br>
&gt;To: <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
&gt;Message-ID:<br>
&gt;       &lt;CA+YyFz5s=<a href="mailto:CEYn7PsqnyutMXUYhXzGr3yWbNtEXRJaEuOv01zRw@mail.gmail.com" target="_blank">CEYn7PsqnyutMXUYhXzGr3yWbNtEXRJaEuOv01zRw@mail.gmail.com</a>&gt;<br>
&gt;Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
&gt;<br>
&gt;Hi guys,<br>
&gt;Has any one faced any issue with tomcat 8 adapters.<br>
&gt;For some reason i am not get keycloak login screen on my web app,Here is my<br>
&gt;scenario<br>
&gt;<br>
&gt;1. Latest version of Keycloak runs on wildfly<br>
&gt;2. A war runs on tomcat.I put all the jar files under tomcat/lib dir.Below<br>
&gt;is the keycloak.json and my web.xml file which goes under my WEB-INF<br>
&gt;3. When i login , i directly gets my webapp page and it does not redirects<br>
&gt;me to keycloak login page.<br>
&gt;4. My webapp is build using angularjs<br>
&gt;<br>
&gt;keycloak.json<br>
&gt;********************<br>
&gt;<br>
&gt;{<br>
&gt;<br>
&gt;  &quot;realm&quot;: &quot;SnrAppsRealm&quot;,<br>
&gt;<br>
&gt;  &quot;realm-public-key&quot;:<br>
&gt;&quot;MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAutb9hlKhbZvIm6RDPPFFpR1RcNAt/NpzCWemJOveG1Ve5eu2AwPKwmqvkhTaMWUW990BFPIkBRPv13Grt9AVTMTgU10IeK/PM9CGN05eFr6S3KMSSTskpszIN3opiRQ5r8/eCYjC4Bk6qFkbtrlp6ORvUkLS7nMLwVLh9JDo2Fx9nWd+l1oLq1YpYMYeLDcaOAW/vdjYSfyLueu2wESjY9oSEs8x43ZyIhNKGRmW3oDXYL8X5guiqalZD5gbhWv6v3WpeTqdi0sLv4GI2B3oSG76Z/x2On/Sc2r3szfM8kUllyV7K8uYoMgD7DFVOZX5g6Bi6xntzkJHwLMJtW4UPwIDAQAB&quot;,<br>
&gt;<br>
&gt;  &quot;auth-server-url&quot;: &quot;<a href="http://xxxxx.com:9322/auth" rel="noreferrer" target="_blank">http://xxxxx.com:9322/auth</a>&quot;,<br>
&gt;<br>
&gt;  &quot;ssl-required&quot;: &quot;none&quot;,<br>
&gt;<br>
&gt;  &quot;resource&quot;: &quot;snrapps-web&quot;,<br>
&gt;<br>
&gt;  &quot;credentials&quot;: {<br>
&gt;<br>
&gt;    &quot;secret&quot;: &quot;dda19c87-efee-4c33-a1b3-8b64ad545s0f&quot;<br>
&gt;<br>
&gt;  },<br>
&gt;<br>
&gt;  &quot;use-resource-role-mappings&quot;: true<br>
&gt;<br>
&gt;}<br>
&gt;<br>
&gt;*****************************<br>
&gt;<br>
&gt;web.xml<br>
&gt;<br>
&gt;&lt;web-app xmlns=&quot;<a href="http://java.sun.com/xml/ns/javaee" rel="noreferrer" target="_blank">http://java.sun.com/xml/ns/javaee</a>&quot; xmlns:xsi=&quot;<br>
&gt;<a href="http://www.w3.org/2001/XMLSchema-instance" rel="noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
&gt;<br>
&gt;xsi:schemaLocation=&quot;<a href="http://java.sun.com/xml/ns/javaee" rel="noreferrer" target="_blank">http://java.sun.com/xml/ns/javaee</a><br>
&gt;<a href="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" rel="noreferrer" target="_blank">http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd</a>&quot; version=&quot;3.0&quot;&gt;<br>
&gt;<br>
&gt;       &lt;module-name&gt;snrapps-web&lt;/module-name&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;    &lt;security-constraint&gt;<br>
&gt;<br>
&gt;        &lt;web-resource-collection&gt;<br>
&gt;<br>
&gt;            &lt;web-resource-name&gt;/snrapps-web&lt;/web-resource-name&gt;<br>
&gt;<br>
&gt;            &lt;url-pattern&gt;/*&lt;/url-pattern&gt;<br>
&gt;<br>
&gt;        &lt;/web-resource-collection&gt;<br>
&gt;<br>
&gt;        &lt;auth-constraint&gt;<br>
&gt;<br>
&gt;            &lt;role-name&gt;user&lt;/role-name&gt;<br>
&gt;<br>
&gt;        &lt;/auth-constraint&gt;<br>
&gt;<br>
&gt;    &lt;/security-constraint&gt;<br>
&gt;<br>
&gt;<br>
&gt;    &lt;security-constraint&gt;<br>
&gt;<br>
&gt;        &lt;web-resource-collection&gt;<br>
&gt;<br>
&gt;        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;<br>
&gt;<br>
&gt;        &lt;/web-resource-collection&gt;<br>
&gt;<br>
&gt;        &lt;user-data-constraint&gt;<br>
&gt;<br>
&gt;            &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;<br>
&gt;<br>
&gt;        &lt;/user-data-constraint&gt;<br>
&gt;<br>
&gt;    &lt;/security-constraint&gt;<br>
&gt;<br>
&gt;    &lt;login-config&gt;<br>
&gt;<br>
&gt;        &lt;auth-method&gt;BASIC&lt;/auth-method&gt;<br>
&gt;<br>
&gt;        &lt;realm-name&gt;this is ignored currently&lt;/realm-name&gt;<br>
&gt;<br>
&gt;    &lt;/login-config&gt;<br>
&gt;<br>
&gt;    &lt;security-role&gt;<br>
&gt;<br>
&gt;        &lt;role-name&gt;admin&lt;/role-name&gt;<br>
&gt;<br>
&gt;    &lt;/security-role&gt;<br>
&gt;<br>
&gt;    &lt;security-role&gt;<br>
&gt;<br>
&gt;        &lt;role-name&gt;user&lt;/role-name&gt;<br>
&gt;<br>
&gt;    &lt;/security-role&gt;<br>
&gt;<br>
&gt;&lt;/web-app&gt;<br>
&gt;<br>
&gt;<br>
&gt;***************<br>
&gt;<br>
&gt;META-INF/context.xml<br>
&gt;<br>
&gt;<br>
&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>
&gt;<br>
&gt;    &lt;Context path=&quot;/snrapps-web&quot;&gt;<br>
&gt;<br>
&gt;        &lt;Valve className=<br>
&gt;&quot;org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve&quot; /&gt;<br>
&gt;<br>
&gt;    &lt;/Context&gt;<br>
&gt;<br>
&gt;<br>
&gt;***********<br>
&gt;-------------- next part --------------<br>
&gt;An HTML attachment was scrubbed...<br>
&gt;URL: <a href="http://lists.jboss.org/pipermail/keycloak-user/attachments/20151101/8c65d636/attachment.html" rel="noreferrer" target="_blank">http://lists.jboss.org/pipermail/keycloak-user/attachments/20151101/8c65d636/attachment.html</a><br>
&gt;<br>
&gt;------------------------------<br>
&gt;<br>
&gt;_______________________________________________<br>
&gt;keycloak-user mailing list<br>
&gt;<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
&gt;<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
&gt;<br>
&gt;End of keycloak-user Digest, Vol 23, Issue 1<br>
&gt;********************************************<br>
<br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>