Repository: cxf-fediz Updated Branches: refs/heads/1.3.x-fixes 7a71e333a -> 4f59dd2ec
Fixing support for SAML SSO protocol in 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/4f59dd2e Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/4f59dd2e Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/4f59dd2e Branch: refs/heads/1.3.x-fixes Commit: 4f59dd2ec027ef446051a34df8fb4737688b87d6 Parents: 7a71e33 Author: Colm O hEigeartaigh <[email protected]> Authored: Thu Dec 8 10:12:15 2016 +0000 Committer: Colm O hEigeartaigh <[email protected]> Committed: Thu Dec 8 10:27:24 2016 +0000 ---------------------------------------------------------------------- .../service/idp/beans/STSClientAction.java | 5 -- .../ApplicationSAMLSSOProtocolHandler.java | 57 ++++++++++++++++++++ 2 files changed, 57 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4f59dd2e/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java index 0c01352..0d6c37d 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java @@ -272,11 +272,6 @@ public class STSClientAction { sts.setEnableAppliesTo(serviceConfig.isEnableAppliesTo()); sts.setOnBehalfOf(idpToken.getToken()); - if (!(serviceConfig.getProtocol() == null - || FederationConstants.WS_FEDERATION_NS.equals(serviceConfig.getProtocol()))) { - LOG.error("Protocol {} not supported for realm {} ", serviceConfig.getProtocol(), realm); - throw new ProcessingException(TYPE.BAD_REQUEST); - } if (properties != null) { sts.setProperties(properties); http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4f59dd2e/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/ApplicationSAMLSSOProtocolHandler.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/ApplicationSAMLSSOProtocolHandler.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/ApplicationSAMLSSOProtocolHandler.java new file mode 100644 index 0000000..ebab362 --- /dev/null +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/ApplicationSAMLSSOProtocolHandler.java @@ -0,0 +1,57 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.cxf.fediz.service.idp.protocols; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.cxf.fediz.service.idp.spi.ApplicationProtocolHandler; + +import org.springframework.stereotype.Component; +import org.springframework.webflow.execution.RequestContext; + +@Component +public class ApplicationSAMLSSOProtocolHandler implements ApplicationProtocolHandler { + + public static final String PROTOCOL = "urn:oasis:names:tc:SAML:2.0:profiles:SSO:browser"; + + //private static final Logger LOG = LoggerFactory.getLogger(ApplicationWSFedProtocolHandler.class); + + @Override + public boolean canHandleRequest(HttpServletRequest request) { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getProtocol() { + return PROTOCOL; + } + + @Override + public void mapSignInRequest(RequestContext context) { + // TODO Auto-generated method stub + } + + @Override + public void mapSignInResponse(RequestContext context) { + // TODO Auto-generated method stub + } + +}
