<html><body><div style="color:#000; background-color:#fff; font-family:garamond, new york, times, serif;font-size:14px"><div id="yui_3_16_0_1_1440812552287_2828"><span id="yui_3_16_0_1_1440812552287_2864">We checked the demo code and found the following endpoint is used instead,</span></div><div id="yui_3_16_0_1_1440812552287_2828"><span><br></span></div><div id="yui_3_16_0_1_1440812552287_2828" dir="ltr"><span id="yui_3_16_0_1_1440812552287_2859">auth/realms/{reaml}/protocol/openid-connect/logout<br></span></div><div id="yui_3_16_0_1_1440812552287_2922"><br></div><div id="yui_3_16_0_1_1440812552287_2950"><br></div><div id="yui_3_16_0_1_1440812552287_2951">What is the difference ?</div><div id="yui_3_16_0_1_1440812552287_2952"><br></div><div id="yui_3_16_0_1_1440812552287_2953">TiA</div><div id="yui_3_16_0_1_1440812552287_2954">Mzi</div><div id="yui_3_16_0_1_1440812552287_2955"><br></div> <div style="font-family: garamond, new york, times, serif; font-size: 14px;" id="yui_3_16_0_1_1440812552287_2889"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1440812552287_2888"> <div dir="ltr" id="yui_3_16_0_1_1440812552287_2887"> <hr size="1" id="yui_3_16_0_1_1440812552287_2956"> <font size="2" face="Arial" id="yui_3_16_0_1_1440812552287_2957"> <b><span style="font-weight:bold;">From:</span></b> Shiva Saxena <shivasaxena999@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Bill Burke <bburke@redhat.com> <br><b><span style="font-weight: bold;">Cc:</span></b> keycloak-user <keycloak-user@lists.jboss.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, August 28, 2015 2:07 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [keycloak-user] Can not logout with RESTFul API<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_1_1440812552287_2958"><br><div id="yiv5586962501"><div id="yui_3_16_0_1_1440812552287_2960"><div dir="ltr" id="yui_3_16_0_1_1440812552287_2959"><span style="font-size:12.8000001907349px;">HI Mai,<br clear="none"></span><br clear="none">The endpoint is auth<span style="font-size:12.8000001907349px;">/admin/realms/{realm}/users/{</span><span style="font-size:12.8000001907349px;">username}/logout please try it.</span><div class="yiv5586962501gmail_extra"><br clear="none"><div class="qtdSeparateBR"><br><br></div><div class="yiv5586962501yqt1545553189" id="yiv5586962501yqt80528"><div class="yiv5586962501gmail_quote">On Thu, Aug 27, 2015 at 7:03 PM, Bill Burke <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:bburke@redhat.com" target="_blank" href="mailto:bburke@redhat.com">bburke@redhat.com</a>></span> wrote:<br clear="none"><blockquote class="yiv5586962501gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">getPreferredUsername() is username<br clear="none">
getSubject() is userId<br clear="none">
<br clear="none">
On 8/25/2015 8:26 PM, Mai Zi wrote:<br clear="none">
><br clear="none">
><br clear="none">
> Hi,<br clear="none">
> We are using the version 1.1.0 final. According to the doc, to logout<br clear="none">
> current user, we call the method:<br clear="none">
><br clear="none">
> /admin/realms/{realm}/users/{username}/logout<br clear="none">
> <<a rel="nofollow" shape="rect" target="_blank" href="http://docs.jboss.org/keycloak/docs/1.1.0.Final/rest-api/admin/realms/%7Brealm%7D/users/%7Busername%7D/logout/index.html">http://docs.jboss.org/keycloak/docs/1.1.0.Final/rest-api/admin/realms/%7Brealm%7D/users/%7Busername%7D/logout/index.html</a>><br clear="none">
><br clear="none">
> We got the name as session.getIdToken.getName()<br clear="none">
><br clear="none">
><br clear="none">
> but get an 404 error.<br clear="none">
><br clear="none">
> We are not sure what we missed.<br clear="none">
><br clear="none">
><br clear="none">
> Any help will be appreciated.<br clear="none">
><br clear="none">
> Mai<br clear="none">
><br clear="none">
><br clear="none">
><br clear="none">
><br clear="none">
> _______________________________________________<br clear="none">
> keycloak-user mailing list<br clear="none">
> <a rel="nofollow" shape="rect" ymailto="mailto:keycloak-user@lists.jboss.org" target="_blank" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br clear="none">
> <a rel="nofollow" shape="rect" target="_blank" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br clear="none">
><br clear="none">
<span class="yiv5586962501HOEnZb"><font color="#888888"><br clear="none">
--<br clear="none">
Bill Burke<br clear="none">
JBoss, a division of Red Hat<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://bill.burkecentral.com/">http://bill.burkecentral.com</a><br clear="none">
_______________________________________________<br clear="none">
keycloak-user mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:keycloak-user@lists.jboss.org" target="_blank" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br clear="none">
</font></span></blockquote></div></div><br clear="none"><br clear="all"><div><span style="font-size:15px;line-height:21.2999992370605px;font-family:Calibri, sans-serif;color:rgb(0,0,0);">--</span><br clear="none"></div><div class="yiv5586962501gmail_signature"><div dir="ltr"><font face="Calibri,sans-serif" color="#000000" style="font-family:Calibri, sans-serif;"></font><div style="line-height:21.2999992370605px;"><font size="2">Best Regards</font></div><div style="line-height:21.2999992370605px;color:rgb(68,68,68);font-family:Calibri, sans-serif;"><font color="#2672ec" style="line-height:normal;"><span style="line-height:21px;"><font style="line-height:normal;"><b style="line-height:22.7199993133545px;"><font face="Calibri" style="line-height:normal;" size="2">Shiva Saxena</font></b></font></span><font face="Calibri"><br clear="none" style="line-height:21px;"><span style="line-height:21px;"><font style="line-height:normal;" size="2"><b style="line-height:18.4599990844727px;">Mobile : +91-9889787094 </b></font></span></font></font><div style="line-height:21px;"><font style="line-height:normal;" size="2"><b style="line-height:18.4599990844727px;"><font face="Calibri" color="#2672ec" style="line-height:normal;"><a rel="nofollow" shape="rect" target="_blank" href="http://metalop.com/" style="line-height:18.4599990844727px;font-weight:inherit;color:blue;">Blog</a></font><font color="#444444" style="line-height:normal;"> | <a rel="nofollow" shape="rect" target="_blank" href="http://in.linkedin.com/in/shivasaxena/" style="line-height:18.4599990844727px;font-weight:inherit;color:blue;">Linkedin</a> | <a rel="nofollow" shape="rect" target="_blank" href="http://stackoverflow.com/users/2490343/shiva" style="line-height:18.4599990844727px;font-weight:inherit;color:blue;">StackOverflow</a></font></b></font></div></div></div></div>
</div></div></div></div><br><div class="yqt1545553189" id="yqt43986">_______________________________________________<br clear="none">keycloak-user mailing list<br clear="none"><a shape="rect" ymailto="mailto:keycloak-user@lists.jboss.org" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br clear="none"><a shape="rect" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></div><br><br></div> </div> </div> </div></body></html>