<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Logout functionality in Publish in Adobe Experience Manager Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426615#M121540</link>
    <description>&lt;P&gt;&lt;LI-USER uid="17406045"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Cookies play a important role to maintain the login session. So in case for AEM ( Author or Publisher) you can simply remove the &lt;STRONG&gt;"login-token"&lt;/STRONG&gt; which makes user logout.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Oct 2021 12:10:43 GMT</pubDate>
    <dc:creator>BrijeshYadav</dc:creator>
    <dc:date>2021-10-07T12:10:43Z</dc:date>
    <item>
      <title>Logout functionality in Publish</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426215#M121425</link>
      <description>&lt;P&gt;Calling "/system/sling/logout" clears jackrabbit repo token, which can be validated in "/system/console/tokenmgr". But what is the way to implement this programmatically, without calling the redirect to "/system/sling/logout", since I need to do more processing, namely redirect the user to the proper page after logging out.&lt;/P&gt;&lt;P&gt;Tried injecting org.apache.sling.api.auth.Authenticator and calling logout - that did not drop CRX login token. Also tried calling javax.jcr.Session.logout() - this did not clear repo token either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 13:40:13 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426215#M121425</guid>
      <dc:creator>parabellumium</dc:creator>
      <dc:date>2021-10-05T13:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Logout functionality in Publish</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426259#M121437</link>
      <description>&lt;P&gt;&lt;LI-USER uid="17406045"&gt;&lt;/LI-USER&gt;&amp;nbsp;have you tried resource query parameter which will redirect to target page after performing login/logout functionality. It works for both login and logout pages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{aemdomain}/system/sling/logout.html?resource=/abcd.html&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 18:16:31 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426259#M121437</guid>
      <dc:creator>Shashi_Mulugu</dc:creator>
      <dc:date>2021-10-05T18:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Logout functionality in Publish</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426615#M121540</link>
      <description>&lt;P&gt;&lt;LI-USER uid="17406045"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Cookies play a important role to maintain the login session. So in case for AEM ( Author or Publisher) you can simply remove the &lt;STRONG&gt;"login-token"&lt;/STRONG&gt; which makes user logout.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 12:10:43 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426615#M121540</guid>
      <dc:creator>BrijeshYadav</dc:creator>
      <dc:date>2021-10-07T12:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Logout functionality in Publish</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426673#M121550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can do logout similar to&lt;/P&gt;&lt;PRE&gt;@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL)
  private volatile Authenticator authenticator;

doLogout(){
// Logout AEM session
      removeAllSessionCookies(request, response);
      final org.apache.sling.api.auth.Authenticator currentThreadAuthenticator = this.authenticator;
      if (currentThreadAuthenticator != null) {
        String postLogoutRedirectUrl = /custom-logout-page.html;
          org.apache.sling.auth.core.AuthUtil.setLoginResourceAttribute(request, postLogoutRedirectUrl);
          currentThreadAuthenticator.logout(request, response);
      }
}&lt;/PRE&gt;&lt;P&gt;The above code is just for reference, you have to handle errors if you is it for production&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 16:48:54 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/logout-functionality-in-publish/m-p/426673#M121550</guid>
      <dc:creator>arunpatidar</dc:creator>
      <dc:date>2021-10-07T16:48:54Z</dc:date>
    </item>
  </channel>
</rss>

