Hi Jérôme,
sorry to bother you again. Azure AD does not support HTTP-POST Binding for central Logout.
So I added the config
cfg.setSpLogoutRequestBindingType(SAMLConstants.SAML2_REDIRECT_BINDING_URI);
cfg.setSpLogoutResponseBindingType(SAMLConstants.SAML2_REDIRECT_BINDING_URI);
In the logs I see the requests being made and the response as URL parameter. My breakpoints also got hit in the LogoutHandler.
2022-06-28 15:32:20,836 [vert.x-worker-thread-3] DEBUG org.pac4j.core.engine.DefaultLogoutLogic - === LOGOUT ===
2022-06-28 15:32:20,836 [vert.x-worker-thread-3] DEBUG org.pac4j.core.engine.DefaultLogoutLogic - redirectUrl: /logout
2022-06-28 15:32:20,836 [vert.x-worker-thread-3] DEBUG org.pac4j.core.engine.DefaultLogoutLogic - Performing central logout
2022-06-28 15:32:20,836 [vert.x-worker-thread-3] DEBUG org.pac4j.core.engine.DefaultLogoutLogic - Profile: #SAML2Profile# | id:
mytes...@mydomain.de | attributes: {notOnOrAfter=2022-06-28T13:37:11.567Z, notBefore=2022-06-28T13:27:11.567Z} | roles: [] | permissions: [] | isRemembered: false | clientName: SAML2Client | linkedId: null |
However the profile does not seem to be removed. So when pac4j redirects to cfg.setPostLogoutUrl (which is the root url of my app therefore it redirects to the IdP again) the session is somehow still active and the last logged in user gets logged in again.
If I am running the same code (except the 2 configs for the REDIRECT binding for logouts) against our Okta, everything works fine. User logs out, session is destroyed, redirect to root url, redirect to Idp and the user needs to login with his credentials again.
Regards
Robert