From 92c0ddf63bfa5db01413c0fcbfc3cdeffc75aefb Mon Sep 17 00:00:00 2001 From: Dimitrios Kaitantzidis Date: Mon, 7 Oct 2024 23:21:36 +0300 Subject: [PATCH] WIP: Try to add saml2 logout with defaults (SamlConfig) --- .../software/SPDF/config/security/saml/SamlConfig.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/config/security/saml/SamlConfig.java b/src/main/java/stirling/software/SPDF/config/security/saml/SamlConfig.java index 5d1e47bf..aaaa68e7 100644 --- a/src/main/java/stirling/software/SPDF/config/security/saml/SamlConfig.java +++ b/src/main/java/stirling/software/SPDF/config/security/saml/SamlConfig.java @@ -15,10 +15,7 @@ import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.security.converter.RsaKeyConverters; import org.springframework.security.saml2.core.Saml2X509Credential; -import org.springframework.security.saml2.provider.service.registration.InMemoryRelyingPartyRegistrationRepository; -import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration; -import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository; -import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrations; +import org.springframework.security.saml2.provider.service.registration.*; import lombok.extern.slf4j.Slf4j; import stirling.software.SPDF.model.ApplicationProperties; @@ -80,6 +77,7 @@ public class SamlConfig { party.wantAuthnRequestsSigned(true) .verificationX509Credentials( c -> c.add(apCredential))) + .singleLogoutServiceLocation("http://localhost:8090/logout/saml2/slo") .build(); return new InMemoryRelyingPartyRegistrationRepository(registration); }