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:-
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
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