slingAuthenticator logout does not logout the aem user for asset share for aem6.5 | Community
Skip to main content
srinivas_chann1
Level 7
February 1, 2022
Solved

slingAuthenticator logout does not logout the aem user for asset share for aem6.5

  • February 1, 2022
  • 1 reply
  • 754 views

Hi ,

I am using saml login mechanism and in the properties have set Logout URL as 

https://app.com/ext/logout"

 

 

Now for logout in the <a> tag we have added ,

 

<a class="cmp-user__action"
href="https://app.com/ext/logout"
data-asset-share-id="cmp-user-menu__logout-link">
Log out
</a>

 

 

We have written a custom Javascript&colon;-

 

jQuery((function($, ns, cart) {
"use strict";

// on logout click this will cause slingAuthenticator logout
$("body").on("click", ns.Elements.selector("cmp-user-menu__logout-link"), function(event) {
$.get('/bin/logout').always(function () {

event.preventDefault();
document.location = "https://app.com/ext/logout";
});
});
}(jQuery,
AssetShare,
AssetShare.Cart)));

 

So when the user hits the logout it will call the javascript on click event

 

public final class Logout extends SlingSafeMethodsServlet {
@3214626
private Authenticator slingAuthenticator;
public static final String SERVLET_PATH = "/bin/zebra/logout";

@9944223
protected void doGet(final SlingHttpServletRequest request, final SlingHttpServletResponse response) {
slingAuthenticator.logout(request, response);
}
}

 

 

So now 

 

 

After that when I hit login ,it again login without asking for userid and password.

 

So the logout does not work.

 

How could i resolve the logout issue, could  you please provide inputs

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @srinivas_chann1, I think that the problem is that you logout from AEM only, however on IdP level session is still active. Similar issue with solution has been described under following topic:

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-make-saml-authentication-handler-handle-logout/m-p/235146

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
February 1, 2022

Hi @srinivas_chann1, I think that the problem is that you logout from AEM only, however on IdP level session is still active. Similar issue with solution has been described under following topic:

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-make-saml-authentication-handler-handle-logout/m-p/235146