cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf-fediz git commit: Make sure we have an IdP token
Date Mon, 24 Jul 2017 16:38:59 GMT
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 <coheigea@apache.org>
Authored: Mon Jul 24 17:38:48 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@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");


Mime
View raw message