return proper status code to IsPassive requests
authorwnorris <wnorris@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 12 Oct 2007 22:28:34 +0000 (22:28 +0000)
committerwnorris <wnorris@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 12 Oct 2007 22:28:34 +0000 (22:28 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2416 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

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

index 582e9fe..fd84784 100644 (file)
@@ -209,8 +209,13 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler {
         try {
             if (loginContext.getPrincipalName() == null) {
                 log.error("User's login context did not contain a principal, user considered unauthenticiated.");
-                requestContext
+                if (loginContext.getPassiveAuth()) {
+                    requestContext
+                        .setFailureStatus(buildStatus(StatusCode.RESPONDER_URI, StatusCode.NO_PASSIVE_URI, null));
+                } else {
+                    requestContext
                         .setFailureStatus(buildStatus(StatusCode.RESPONDER_URI, StatusCode.AUTHN_FAILED_URI, null));
+                }
                 throw new ProfileException("User failed authentication");
             }