You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by jb...@apache.org on 2016/01/07 11:39:22 UTC

[3/4] cxf-fediz git commit: [FEDIZ-53] Fix whr parameter reading

[FEDIZ-53] Fix whr parameter reading


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

Branch: refs/heads/master
Commit: 141150dae8d76d944dbfd536231f5f43ecc93bb4
Parents: 24af622
Author: Jan Bernhardt <jb...@talend.com>
Authored: Thu Jan 7 11:31:02 2016 +0100
Committer: Jan Bernhardt <jb...@talend.com>
Committed: Thu Jan 7 11:31:02 2016 +0100

----------------------------------------------------------------------
 .../cxf/fediz/core/handler/HomeRealmCallbackHandler.java       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/141150da/plugins/core/src/main/java/org/apache/cxf/fediz/core/handler/HomeRealmCallbackHandler.java
----------------------------------------------------------------------
diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/handler/HomeRealmCallbackHandler.java b/plugins/core/src/main/java/org/apache/cxf/fediz/core/handler/HomeRealmCallbackHandler.java
index a87e2a0..1aa880a 100644
--- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/handler/HomeRealmCallbackHandler.java
+++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/handler/HomeRealmCallbackHandler.java
@@ -24,8 +24,8 @@ import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
 
+import org.apache.cxf.fediz.core.FederationConstants;
 import org.apache.cxf.fediz.core.spi.HomeRealmCallback;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -39,11 +39,11 @@ public class HomeRealmCallbackHandler implements CallbackHandler {
         for (int i = 0; i < callbacks.length; i++) {
             if (callbacks[i] instanceof HomeRealmCallback) {
                 HomeRealmCallback callback = (HomeRealmCallback) callbacks[i];
-                String homeRealm = (String)callback.getRequest().getAttribute("whr");
+                String homeRealm = (String)callback.getRequest().getParameter(FederationConstants.PARAM_HOME_REALM);
                 if (homeRealm == null || homeRealm.length() == 0) {
                     LOG.debug("No home realm found in request");
                 } else {
-                    LOG.info("Home realm '" + homeRealm + "' found in request");
+                    LOG.info("Home realm '{}' found in request", homeRealm);
                     callback.setHomeRealm(homeRealm);
                 }