<div dir="ltr">Hi Stian,<div><br></div><div>Thanks for the reply.</div><div>I found only one Angular examples at <a href="https://github.com/keycloak/keycloak/tree/master/examples/demo-template/angular-product-app">https://github.com/keycloak/keycloak/tree/master/examples/demo-template/angular-product-app</a></div><div><br></div><div>But in this example also they are not fetching logged in user ID</div><div><br></div><div>I also went through JavaScript adapter documentation where i got to know Subject property of Keycloak can help me  to get the user id but how to write it in code I am not getting. Tried many solutions but not getting userid.</div><div><br></div><div>I am using below code as if now to authenticate through Keycloak.</div><div><br></div><div><div>var keycloakAuth = new Keycloak(&#39;javascript/keycloak.json&#39;);</div><div>                keycloakAuth.init({ onLoad: &#39;login-required&#39; }).success(function () {</div><div>                }).error(function () {</div><div>                        });</div></div><div><br></div><div>Kindly suggest how can i get logged in userid here.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 4:03 AM, Stian Thorgersen <span dir="ltr">&lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.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">For Angular app you should use the JavaScript adapter. Please look at our examples, there&#39;s a Angular example in there. Also, look at the JavaScript adapter documentation.</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 7 December 2015 at 10:08, Rushil Agarwal <span dir="ltr">&lt;<a href="mailto:rushil.vaish@gmail.com" target="_blank">rushil.vaish@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi Team,<div><br></div><div>I am using Keycloak for Authenticating my Angular web based application.</div><div>Trying to grasp currently logged in user which I am not able to.</div><div><br></div><div>All i know is through KeycloakSecurityContext i may get, but how to use it not sure.</div><div><br></div><div>Kindly help. </div><div>Thanks in advance..!!<br clear="all"><div><br></div><div><div dir="ltr"><br style="color:rgb(0,0,0);font-family:arial;font-size:small"><b style="color:rgb(0,0,0);font-family:arial;font-size:small">With best regards :-</b><font style="font-family:arial;font-size:small" color="#990000"><br></font><div><font style="font-family:arial;font-size:small" color="#990000">Rushil Agarwal</font><div><div><font color="#996633" style="font-family:arial;font-size:small">Mobile: <a href="tel:%2B91%2078298%2086000" value="+917829886000" target="_blank">+91 78298 86000</a></font></div><div><font color="#996633" face="arial"><br></font><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><font color="#006600">Please don&#39;t print this e-mail unless you really need to. SAVE PAPER TO SAVE TREES</font></div></div></div></div></div></div>
</div></div>
<br></div></div>_______________________________________________<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span style="color:rgb(0,0,0);font-family:arial;font-size:small">-- </span><br style="color:rgb(0,0,0);font-family:arial;font-size:small"><b style="color:rgb(0,0,0);font-family:arial;font-size:small">With best regards :-</b><br style="color:rgb(0,0,0);font-family:arial;font-size:small"><font style="font-family:arial;font-size:small" color="#990000"><br></font><div><font style="font-family:arial;font-size:small" color="#990000">Rushil Agarwal</font><div><font color="#990000" face="arial" size="2"><br></font><div><font color="#996633" style="font-family:arial;font-size:small">Mobile: +91 78298 86000</font><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><br></div><div style="color:rgb(0,0,0);font-family:arial;font-size:small"><font color="#006600">Please don&#39;t print this e-mail unless you really need to. SAVE PAPER TO SAVE TREES</font></div></div></div></div></div></div>
</div>