Expand my Community achievements bar.

SOLVED

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

Avatar

Level 8

Hi ,

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

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

 

srinivas_chann1_0-1643695277678.png

 

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 {
@reference
private Authenticator slingAuthenticator;
public static final String SERVLET_PATH = "/bin/zebra/logout";

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

 

 

So now 

srinivas_chann1_2-1643695774765.png

 

 

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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-authentic...

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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-authentic...