[java-identity-provider] branch main updated: Add Scoping checks to unit tests.

Scott Cantor cantor.2 at osu.edu
Mon Dec 19 13:59:45 UTC 2022


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

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=9f9a48015ac5dc725e90a36e56de8bdeaf2991cd

The following commit(s) were added to refs/heads/main by this push:
     new 9f9a48015 Add Scoping checks to unit tests.
9f9a48015 is described below

commit 9f9a48015ac5dc725e90a36e56de8bdeaf2991cd
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Dec 19 08:58:23 2022 -0500

    Add Scoping checks to unit tests.
---
 .../idp/saml/saml2/profile/impl/AddAuthnRequestTest.java           | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
index f876207da..f6bf31428 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
@@ -146,6 +146,9 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertTrue(nid.getAllowCreate());
         
         assertNull(request.getRequestedAuthnContext());
+        
+        final Scoping scoping = request.getScoping();
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
     }
 
     /** Test that the action works for ForceAuthn/IsPassive. */
@@ -206,6 +209,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertNotNull(scoping);
         assertNull(scoping.getProxyCount());
         assertNotNull(scoping.getIDPList());
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
         
         final Set<String> requestedAuthorities = scoping.getIDPList().getIDPEntrys()
                 .stream()
@@ -232,6 +236,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertNotNull(scoping);
         assertNull(scoping.getIDPList());
         assertEquals(scoping.getProxyCount(), Integer.valueOf(0));
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
     }
 
     /** Test with Scoping element and count of 5. */
@@ -250,6 +255,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertNotNull(scoping);
         assertNull(scoping.getIDPList());
         assertEquals(scoping.getProxyCount(), Integer.valueOf(4));
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
     }
 
     /** Test with Scoping element and count of 0 (this shouldn't really happen). */
@@ -268,6 +274,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertNotNull(scoping);
         assertNull(scoping.getIDPList());
         assertEquals(scoping.getProxyCount(), Integer.valueOf(0));
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
     }
 
     /** Test that the action works for RequestedAuthnContext. */

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


More information about the commits mailing list