<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"><<a href="mailto:harshmahey@gmail.com" target="_blank">harshmahey@gmail.com</a>></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"><<a href="mailto:nicolas.grange@retrievercommunications.com" target="_blank">nicolas.grange@retrievercommunications.com</a>></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 <security-constraint> in your web.xml and retest to see if it is the problem.<br>
<br>
Cheers,<br>
Nic<br>
<br>
<br>
><br>
>Message: 4<br>
>Date: Sun, 1 Nov 2015 21:12:23 -0700<br>
>From: harsh mahey <<a href="mailto:harshmahey@gmail.com" target="_blank">harshmahey@gmail.com</a>><br>
>Subject: [keycloak-user] Issue with Tomcat 8 adapter ?<br>
>To: <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
>Message-ID:<br>
> <CA+YyFz5s=<a href="mailto:CEYn7PsqnyutMXUYhXzGr3yWbNtEXRJaEuOv01zRw@mail.gmail.com" target="_blank">CEYn7PsqnyutMXUYhXzGr3yWbNtEXRJaEuOv01zRw@mail.gmail.com</a>><br>
>Content-Type: text/plain; charset="utf-8"<br>
><br>
>Hi guys,<br>
>Has any one faced any issue with tomcat 8 adapters.<br>
>For some reason i am not get keycloak login screen on my web app,Here is my<br>
>scenario<br>
><br>
>1. Latest version of Keycloak runs on wildfly<br>
>2. A war runs on tomcat.I put all the jar files under tomcat/lib dir.Below<br>
>is the keycloak.json and my web.xml file which goes under my WEB-INF<br>
>3. When i login , i directly gets my webapp page and it does not redirects<br>
>me to keycloak login page.<br>
>4. My webapp is build using angularjs<br>
><br>
>keycloak.json<br>
>********************<br>
><br>
>{<br>
><br>
> "realm": "SnrAppsRealm",<br>
><br>
> "realm-public-key":<br>
>"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAutb9hlKhbZvIm6RDPPFFpR1RcNAt/NpzCWemJOveG1Ve5eu2AwPKwmqvkhTaMWUW990BFPIkBRPv13Grt9AVTMTgU10IeK/PM9CGN05eFr6S3KMSSTskpszIN3opiRQ5r8/eCYjC4Bk6qFkbtrlp6ORvUkLS7nMLwVLh9JDo2Fx9nWd+l1oLq1YpYMYeLDcaOAW/vdjYSfyLueu2wESjY9oSEs8x43ZyIhNKGRmW3oDXYL8X5guiqalZD5gbhWv6v3WpeTqdi0sLv4GI2B3oSG76Z/x2On/Sc2r3szfM8kUllyV7K8uYoMgD7DFVOZX5g6Bi6xntzkJHwLMJtW4UPwIDAQAB",<br>
><br>
> "auth-server-url": "<a href="http://xxxxx.com:9322/auth" rel="noreferrer" target="_blank">http://xxxxx.com:9322/auth</a>",<br>
><br>
> "ssl-required": "none",<br>
><br>
> "resource": "snrapps-web",<br>
><br>
> "credentials": {<br>
><br>
> "secret": "dda19c87-efee-4c33-a1b3-8b64ad545s0f"<br>
><br>
> },<br>
><br>
> "use-resource-role-mappings": true<br>
><br>
>}<br>
><br>
>*****************************<br>
><br>
>web.xml<br>
><br>
><web-app xmlns="<a href="http://java.sun.com/xml/ns/javaee" rel="noreferrer" target="_blank">http://java.sun.com/xml/ns/javaee</a>" xmlns:xsi="<br>
><a href="http://www.w3.org/2001/XMLSchema-instance" rel="noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
><br>
>xsi:schemaLocation="<a href="http://java.sun.com/xml/ns/javaee" rel="noreferrer" target="_blank">http://java.sun.com/xml/ns/javaee</a><br>
><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>" version="3.0"><br>
><br>
> <module-name>snrapps-web</module-name><br>
><br>
><br>
><br>
> <security-constraint><br>
><br>
> <web-resource-collection><br>
><br>
> <web-resource-name>/snrapps-web</web-resource-name><br>
><br>
> <url-pattern>/*</url-pattern><br>
><br>
> </web-resource-collection><br>
><br>
> <auth-constraint><br>
><br>
> <role-name>user</role-name><br>
><br>
> </auth-constraint><br>
><br>
> </security-constraint><br>
><br>
><br>
> <security-constraint><br>
><br>
> <web-resource-collection><br>
><br>
> <url-pattern>/*</url-pattern><br>
><br>
> </web-resource-collection><br>
><br>
> <user-data-constraint><br>
><br>
> <transport-guarantee>CONFIDENTIAL</transport-guarantee><br>
><br>
> </user-data-constraint><br>
><br>
> </security-constraint><br>
><br>
> <login-config><br>
><br>
> <auth-method>BASIC</auth-method><br>
><br>
> <realm-name>this is ignored currently</realm-name><br>
><br>
> </login-config><br>
><br>
> <security-role><br>
><br>
> <role-name>admin</role-name><br>
><br>
> </security-role><br>
><br>
> <security-role><br>
><br>
> <role-name>user</role-name><br>
><br>
> </security-role><br>
><br>
></web-app><br>
><br>
><br>
>***************<br>
><br>
>META-INF/context.xml<br>
><br>
><br>
><?xml version="1.0" encoding="UTF-8"?><br>
><br>
> <Context path="/snrapps-web"><br>
><br>
> <Valve className=<br>
>"org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve" /><br>
><br>
> </Context><br>
><br>
><br>
>***********<br>
>-------------- next part --------------<br>
>An HTML attachment was scrubbed...<br>
>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>
><br>
>------------------------------<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>
><br>
>End of keycloak-user Digest, Vol 23, Issue 1<br>
>********************************************<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>