Only set default authn method is one is given
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 15 Mar 2008 09:12:20 +0000 (09:12 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Sat, 15 Mar 2008 09:12:20 +0000 (09:12 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2701 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ShibbolethSSOProfileHandler.java

index 25013fc..dc1f1be 100644 (file)
@@ -150,7 +150,10 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler {
             throw new ProfileException("Shibboleth SSO profile is not configured for relying party "
                     + loginContext.getRelyingPartyId());
         }
-        loginContext.getRequestedAuthenticationMethods().add(rpConfig.getDefaultAuthenticationMethod());
+        if (loginContext.getRequestedAuthenticationMethods().size() == 0
+                && rpConfig.getDefaultAuthenticationMethod() != null) {
+            loginContext.getRequestedAuthenticationMethods().add(rpConfig.getDefaultAuthenticationMethod());
+        }
 
         httpRequest.setAttribute(LoginContext.LOGIN_CONTEXT_KEY, loginContext);