Fix case where login handler returns a different authentication method than was used...
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 27 Nov 2008 13:52:43 +0000 (13:52 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 27 Nov 2008 13:52:43 +0000 (13:52 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@2814 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml2/SSOProfileHandler.java

index 4e5aae3..0b0c6bd 100644 (file)
@@ -453,7 +453,7 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler {
     }
 
     /**
-     * Creates an {@link AuthnContext} for a succesful authentication request.
+     * Creates an {@link AuthnContext} for a successful authentication request.
      * 
      * @param requestContext current request
      * 
@@ -483,7 +483,9 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler {
                     }
                 }
             }
-        } else {
+        }
+        
+        if(authnContext.getAuthnContextClassRef() == null || authnContext.getAuthnContextDeclRef() == null){
             AuthnContextDeclRef ref = authnContextDeclRefBuilder.buildObject();
             ref.setAuthnContextDeclRef(loginContext.getAuthenticationMethod());
             authnContext.setAuthnContextDeclRef(ref);