Repository: cxf-fediz
Updated Branches:
  refs/heads/master c3d34d5a3 -> 5865dcf58


Make sure we have an IdP token


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

Branch: refs/heads/master
Commit: 5865dcf58da7d9f318519436d0a5f0924f2e874c
Parents: c3d34d5
Author: Colm O hEigeartaigh <cohei...@apache.org>
Authored: Mon Jul 24 17:38:48 2017 +0100
Committer: Colm O hEigeartaigh <cohei...@apache.org>
Committed: Mon Jul 24 17:38:48 2017 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/fediz/service/idp/beans/STSClientAction.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/5865dcf5/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
----------------------------------------------------------------------
diff --git 
a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
 
b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
index 3817380..258bbde 100644
--- 
a/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
+++ 
b/services/idp-core/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java
@@ -184,6 +184,10 @@ public class STSClientAction {
     public Element submit(RequestContext context, String realm, String 
homeRealm) throws Exception {
 
         SecurityToken idpToken = getSecurityToken(context, homeRealm);
+        if (idpToken == null || idpToken.getToken() == null) {
+            LOG.warn("No IdPToken is found");
+            throw new ProcessingException(TYPE.BAD_REQUEST);
+        }
 
         Bus cxfBus = getBus();
         Idp idpConfig = (Idp)WebUtils.getAttributeFromFlowScope(context, 
"idpConfig");

Reply via email to