[java-plugin-shibd-saml] branch main updated: Handle byte values with Base64 encoding.
Scott Cantor
cantor.2 at osu.edu
Thu Apr 17 13:57:04 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=bc9d88db75f6e195dca5759374671a9e70fadce7
The following commit(s) were added to refs/heads/main by this push:
new bc9d88d Handle byte values with Base64 encoding.
bc9d88d is described below
commit bc9d88db75f6e195dca5759374671a9e70fadce7
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Apr 17 09:57:02 2025 -0400
Handle byte values with Base64 encoding.
---
.../sp/saml/saml2/profile/impl/PrepareAgentResponseTest.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 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 8a06980..5be2247 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
@@ -50,6 +50,7 @@ import net.shibboleth.idp.profile.testing.ActionTestingSupport;
import net.shibboleth.shared.annotation.constraint.NotEmpty;
import net.shibboleth.shared.codec.Base64Support;
import net.shibboleth.shared.codec.DecodingException;
+import net.shibboleth.shared.codec.EncodingException;
import net.shibboleth.shared.collection.CollectionSupport;
import net.shibboleth.shared.component.ComponentInitializationException;
import net.shibboleth.shared.net.CookieManager;
@@ -221,9 +222,11 @@ public class PrepareAgentResponseTest extends BaseAgplicationActionTest {
/**
* Unit test for getting attributes serialized into output.
+ *
+ * @throws EncodingException
*/
@Test
- public void testAttributes() {
+ public void testAttributes() throws EncodingException {
final Instant ts = Instant.now();
buildAttributes(ts);
@@ -272,9 +275,9 @@ public class PrepareAgentResponseTest extends BaseAgplicationActionTest {
int i = 0;
for (final DDF value : child.asList()) {
if (i == 0) {
- Assert.assertEquals(value.unsafe_string(), "one".getBytes(StandardCharsets.UTF_8));
+ Assert.assertEquals(value.string(), Base64Support.encode("one".getBytes(StandardCharsets.UTF_8), false));
} else if (i == 1) {
- Assert.assertEquals(value.unsafe_string(), "two".getBytes(StandardCharsets.UTF_8));
+ Assert.assertEquals(value.string(), Base64Support.encode("two".getBytes(StandardCharsets.UTF_8), false));
} else {
Assert.fail("Too many values");
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list