[java-idp-oidc] 01/02: Use 'authn/' prefix in the mock authentication flow id.

Codeberg noreply at shibboleth.net
Fri May 8 06:03:55 UTC 2026


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

codeberg pushed a commit to branch main
in repository java-idp-oidc.

View the commit online:
https://codeberg.org/Shibboleth/java-idp-oidc/commit/615d58183bcc18e16d48ba1581a576cb67611923

commit 615d58183bcc18e16d48ba1581a576cb67611923
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Fri May 8 09:02:36 2026 +0300

    Use 'authn/' prefix in the mock authentication flow id.
---
 ...henticationContextClassReferenceToResponseContextTest.java | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/SetAuthenticationContextClassReferenceToResponseContextTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/SetAuthenticationContextClassReferenceToResponseContextTest.java
index 3d446c01..f358064e 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/SetAuthenticationContextClassReferenceToResponseContextTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/impl/SetAuthenticationContextClassReferenceToResponseContextTest.java
@@ -42,6 +42,8 @@ import com.nimbusds.openid.connect.sdk.claims.ACR;
 /** {@link SetAuthenticationContextClassReferenceToResponseContext} unit test. */
 public class SetAuthenticationContextClassReferenceToResponseContextTest extends BaseOIDCResponseActionTest {
 
+    public static final String AUTHN_FLOW_ID = "authn/mockFlowId";
+
     private SetAuthenticationContextClassReferenceToResponseContext action;
 
     private List<Principal> principals;
@@ -66,16 +68,17 @@ public class SetAuthenticationContextClassReferenceToResponseContextTest extends
         final Subject authSubject = new Subject();
         authSubject.getPrincipals().add(new AuthenticationContextClassReferencePrincipal("2"));
         authSubject.getPrincipals().add(new AuthenticationContextClassReferencePrincipal("4"));
-        final AuthenticationResult result = new AuthenticationResult("flowId", authSubject);
+        final AuthenticationResult result = new AuthenticationResult(AUTHN_FLOW_ID, authSubject);
         profileRequestCtx.ensureSubcontext(AuthenticationContext.class).setAuthenticationResult(result);
         
         final AuthenticationFlowDescriptor descriptor = new AuthenticationFlowDescriptor();
-        descriptor.setId("flowId");
+        descriptor.setId(AUTHN_FLOW_ID);
         descriptor.setPrincipalWeightMap(Collections.singletonMap(new AuthenticationContextClassReferencePrincipal("2"), 10));
         descriptor.setResultSerializer(new DefaultAuthenticationResultSerializer());
         descriptor.initialize();
         
-        profileRequestCtx.ensureSubcontext(AuthenticationContext.class).getAvailableFlows().put("flowId", descriptor);
+        profileRequestCtx.ensureSubcontext(AuthenticationContext.class).getAvailableFlows().put(AUTHN_FLOW_ID,
+                descriptor);
     }
 
     /**
@@ -134,7 +137,7 @@ public class SetAuthenticationContextClassReferenceToResponseContextTest extends
         assert principals != null;
         ppCtx.setPreferredPrincipals(principals);
         profileRequestCtx.ensureSubcontext(AuthenticationContext.class).addSubcontext(ppCtx, true);
-        AuthenticationResult result = new AuthenticationResult("flowId", new Subject());
+        AuthenticationResult result = new AuthenticationResult(AUTHN_FLOW_ID, new Subject());
         profileRequestCtx.ensureSubcontext(AuthenticationContext.class).setAuthenticationResult(result);
         final Event event = action.execute(requestCtx);
         ActionTestingSupport.assertProceedEvent(event);

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


More information about the commits mailing list