[java-plugin-shibd-saml] branch main updated: JSHIBD-17 - Support DDF nodes for session data in AbstractTokenConsumerResponseAction

Codeberg noreply at shibboleth.net
Fri Dec 19 16:57:19 UTC 2025


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository java-plugin-shibd-saml.

View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd-saml/commit/a747c1438ccec0d6a89be6e100eb8ed31213dc63

The following commit(s) were added to refs/heads/main by this push:
     new a747c14  JSHIBD-17 - Support DDF nodes for session data in AbstractTokenConsumerResponseAction
a747c14 is described below

commit a747c1438ccec0d6a89be6e100eb8ed31213dc63
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Fri Dec 19 16:57:06 2025 +0000

    JSHIBD-17 - Support DDF nodes for session data in
    AbstractTokenConsumerResponseAction
    
     - Fix flow test to use the new DDF based opaque session data
    
    https://shibboleth.atlassian.net/browse/JSHIBD-17
---
 .../sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java       | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
index c0ea127..9df97d5 100644
--- a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
+++ b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2TokenConsumerFlowTest.java
@@ -563,12 +563,17 @@ public class SAML2TokenConsumerFlowTest extends AbstractSPFlowTest {
         Assert.assertTrue(mutableIds.isEmpty());
         
         try {
-            final String s = output.getmember(ConsumerConstants.SESSION_OPAQUE).string();
+            final DDF s = output.getmember(ConsumerConstants.SESSION_OPAQUE);
             assert s != null;
-            final byte[] opaque = Base64Support.decodeURLSafe(s);
+            Assert.assertTrue(s.isstruct());
+            final DDF nameIdDdf = s.getmember("nameID");
+            Assert.assertTrue(nameIdDdf.isstring());
+            final String nameIdString = nameIdDdf.string();
+            assert nameIdString != null;
+            final byte[] opaque = Base64Support.decodeURLSafe(nameIdString);
             try (final ByteArrayInputStream in = new ByteArrayInputStream(opaque)) {
                 final XMLObject obj = XMLObjectSupport.unmarshallFromInputStream(parserPool, in);
-                if (obj instanceof NameID nameID) {
+                if (obj instanceof final NameID nameID) {
                     Assert.assertEquals(nameID.getValue(), "jdoe at example.org");
                     Assert.assertEquals(nameID.getFormat(), NameIDType.EMAIL);
                     Assert.assertEquals(nameID.getSPProvidedID(), sessionIndex);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list