Fix to default to taking the RACS URL from the application configuration.

Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/f71e6200
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/f71e6200
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/f71e6200

Branch: refs/heads/1.4.x-fixes
Commit: f71e62006bda7f83f113a52e90a16e613d0837ba
Parents: ea3124e
Author: Colm O hEigeartaigh <cohei...@apache.org>
Authored: Wed Aug 9 15:25:45 2017 +0100
Committer: Colm O hEigeartaigh <cohei...@apache.org>
Committed: Wed Aug 9 15:29:10 2017 +0100

----------------------------------------------------------------------
 .../fediz/service/idp/beans/EndpointAddressValidator.java |  4 ++--
 .../service/idp/beans/samlsso/AuthnRequestParser.java     | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/f71e6200/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/EndpointAddressValidator.java
----------------------------------------------------------------------
diff --git 
a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/EndpointAddressValidator.java
 
b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/EndpointAddressValidator.java
index de193b8..6a19554 100644
--- 
a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/EndpointAddressValidator.java
+++ 
b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/EndpointAddressValidator.java
@@ -46,7 +46,7 @@ public class EndpointAddressValidator {
         Idp idpConfig = (Idp) WebUtils.getAttributeFromFlowScope(context, 
"idpConfig");
         Application serviceConfig = idpConfig.findApplication(realm);
         if (serviceConfig == null) {
-            LOG.warn("No service config found for " + realm);
+            LOG.warn("No service config found for {}", realm);
             return false;
         }
 
@@ -66,7 +66,7 @@ public class EndpointAddressValidator {
 
         Application serviceConfig = idpConfig.findApplication(realm);
         if (serviceConfig == null) {
-            LOG.warn("No service config found for " + realm);
+            LOG.warn("No service config found for {}", realm);
             return false;
         }
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/f71e6200/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java
----------------------------------------------------------------------
diff --git 
a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java
 
b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java
index 3110eb1..92d0d7a 100644
--- 
a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java
+++ 
b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/samlsso/AuthnRequestParser.java
@@ -131,6 +131,16 @@ public class AuthnRequestParser {
         }
 
         LOG.debug("No AuthnRequest available to be parsed");
+
+        Idp idpConfig = (Idp) WebUtils.getAttributeFromFlowScope(context, 
"idpConfig");
+        String realm = retrieveRealm(context);
+        Application serviceConfig = idpConfig.findApplication(realm);
+        if (serviceConfig != null) {
+            String racs = serviceConfig.getPassiveRequestorEndpoint();
+            LOG.debug("Attempting to use the configured passive requestor 
endpoint instead: {}", racs);
+            return racs;
+        }
+
         return null;
     }
 

Reply via email to