From ee25efa91542b69e9ad9c375aada6dacfce822c5 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Sat, 21 Dec 2024 17:37:48 +0700 Subject: [PATCH] Add Serializable for RelyingPartyRegistration Closes gh-16286 --- ...ringSecurityCoreVersionSerializableTests.java | 3 +++ ...ity.saml2.core.Saml2X509Credential.serialized | Bin 0 -> 460 bytes ...Registration$AssertingPartyDetails.serialized | Bin 0 -> 1736 bytes ...istration.RelyingPartyRegistration.serialized | Bin 0 -> 5860 bytes .../security/saml2/core/Saml2X509Credential.java | 7 +++++-- .../registration/AssertingPartyMetadata.java | 3 ++- .../registration/RelyingPartyRegistration.java | 9 +++++++-- 7 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 config/src/test/resources/serialized/6.5.x/org.springframework.security.saml2.core.Saml2X509Credential.serialized create mode 100644 config/src/test/resources/serialized/6.5.x/org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration$AssertingPartyDetails.serialized create mode 100644 config/src/test/resources/serialized/6.5.x/org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration.serialized diff --git a/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java b/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java index 5072da9f5c4..4a6243d16e1 100644 --- a/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java +++ b/config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java @@ -126,6 +126,8 @@ import org.springframework.security.saml2.provider.service.authentication.TestSaml2Authentications; import org.springframework.security.saml2.provider.service.authentication.TestSaml2PostAuthenticationRequests; import org.springframework.security.saml2.provider.service.authentication.TestSaml2RedirectAuthenticationRequests; +import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration; +import org.springframework.security.saml2.provider.service.registration.TestRelyingPartyRegistrations; import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken; import org.springframework.security.web.authentication.preauth.PreAuthenticatedCredentialsNotFoundException; @@ -322,6 +324,7 @@ class SpringSecurityCoreVersionSerializableTests { (r) -> TestSaml2PostAuthenticationRequests.create()); generatorByClassName.put(Saml2RedirectAuthenticationRequest.class, (r) -> TestSaml2RedirectAuthenticationRequests.create()); + generatorByClassName.put(RelyingPartyRegistration.class, (r) -> TestRelyingPartyRegistrations.full().build()); // web generatorByClassName.put(AnonymousAuthenticationToken.class, (r) -> { diff --git a/config/src/test/resources/serialized/6.5.x/org.springframework.security.saml2.core.Saml2X509Credential.serialized b/config/src/test/resources/serialized/6.5.x/org.springframework.security.saml2.core.Saml2X509Credential.serialized new file mode 100644 index 0000000000000000000000000000000000000000..4da506d7ba6ffe68da24dc6b2e236705727843fa GIT binary patch literal 460 zcmbtQyH3L}6uoLel}bf{k-4*j5DX{-pfr?-C{#^_V6=i840#y)rcIV?d;)w0JBWYc zA8>+FD#V5d%U9=d&++RgtSbp-Dnp`#bi%SI_Ii zy(3GqTb3ZF5!9y@wV>_7M!+QU84oBjgn@fc=hSG7j0!Yr^$*K*p&u;GriEY%q5mz+ zkVl5kP;C9Wl zCw20*QiA`F{)0dMq^ePy>uX1El(1PRif9rNJIUfzP#|=Nwl%pKPn}Dze1sA@2p!)U Yd5$+~=H8V(an2m;bd}V#y+)UdFXrozxBvhE literal 0 HcmV?d00001 diff --git a/config/src/test/resources/serialized/6.5.x/org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration$AssertingPartyDetails.serialized b/config/src/test/resources/serialized/6.5.x/org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration$AssertingPartyDetails.serialized new file mode 100644 index 0000000000000000000000000000000000000000..fc4e87f02b62592d359c5be289561bdb65bbc287 GIT binary patch literal 1736 zcmdT^&2G~`5S}J3lu+oOprREgdg5Rs1P9auIVumC>pMq`bZ9?d z?^I6hE^|e!a?G{0vECN2ILPsc?`W2g>@dE-5gmUPJtshV#~lQl9|ALw z6sE0k%<-rZI6+rf1Ii`WZ{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