Repository: cxf-fediz Updated Branches: refs/heads/1.4.x-fixes 79b693c64 -> c107ceaf4
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/c107ceaf Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/c107ceaf Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/c107ceaf Branch: refs/heads/1.4.x-fixes Commit: c107ceaf45237b93fd776ee89fc786dfc07e606e Parents: 79b693c Author: Colm O hEigeartaigh <[email protected]> Authored: Mon Jul 24 17:38:48 2017 +0100 Committer: Colm O hEigeartaigh <[email protected]> Committed: Mon Jul 24 17:39:12 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/c107ceaf/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");
