[java-plugin-shibd-saml] branch main updated: Fix test with CookieManager relay state change.
Scott Cantor
cantor.2 at osu.edu
Thu Apr 10 15:10:27 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-plugin-shibd-saml.
View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd-saml.git;a=commit;h=a388461f04769e18ac46d051c1a56fdde7774b62
The following commit(s) were added to refs/heads/main by this push:
new a388461 Fix test with CookieManager relay state change.
a388461 is described below
commit a388461f04769e18ac46d051c1a56fdde7774b62
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Apr 10 11:10:24 2025 -0400
Fix test with CookieManager relay state change.
---
.../sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java b/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java
index 84d83aa..8a06980 100644
--- a/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java
+++ b/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java
@@ -52,6 +52,8 @@ import net.shibboleth.shared.codec.Base64Support;
import net.shibboleth.shared.codec.DecodingException;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
+import net.shibboleth.shared.net.CookieManager;
+import net.shibboleth.shared.net.CookieManager.SameSiteValue;
import net.shibboleth.shared.primitive.NonnullSupplier;
import net.shibboleth.shared.xml.XMLParserException;
import net.shibboleth.shared.xml.impl.BasicParserPool;
@@ -183,10 +185,15 @@ public class PrepareAgentResponseTest extends BaseAgplicationActionTest {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
+ final CookieManager cookieManager = new CookieManager();
+ cookieManager.setSameSite(SameSiteValue.None);
+ cookieManager.setHttpServletRequestSupplier(NonnullSupplier.of(request));
+ cookieManager.setHttpServletResponseSupplier(NonnullSupplier.of(response));
+ cookieManager.initialize();
+
final CookieStateTokenManager manager = new CookieStateTokenManager();
manager.setId("test");
- manager.setHttpServletRequestSupplier(NonnullSupplier.of(request));
- manager.setHttpServletResponseSupplier(NonnullSupplier.of(response));
+ manager.setCookieManager(cookieManager);
manager.initialize();
application.setStateTokenManager(manager);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list