cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1339724 - /cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractServiceProviderFilter.java
Date Thu, 17 May 2012 17:22:33 GMT
Author: sergeyb
Date: Thu May 17 17:22:33 2012
New Revision: 1339724

URL: http://svn.apache.org/viewvc?rev=1339724&view=rev
Log:
Making possible for individual endpoints to have unique SSO contexts

Modified:
    cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractServiceProviderFilter.java

Modified: cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractServiceProviderFilter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractServiceProviderFilter.java?rev=1339724&r1=1339723&r2=1339724&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractServiceProviderFilter.java
(original)
+++ cxf/trunk/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractServiceProviderFilter.java
Thu May 17 17:22:33 2012
@@ -65,6 +65,11 @@ public abstract class AbstractServicePro
     private AuthnRequestBuilder authnRequestBuilder = new DefaultAuthnRequestBuilder();
     private boolean signRequest;
     private String signatureUsername;
+    private boolean addEndpointAddressToContext;
+    
+    public void setAddEndpointAddressToContext(boolean add) {
+        addEndpointAddressToContext = add;
+    }
     
     public void setSignRequest(boolean signRequest) {
         this.signRequest = signRequest;
@@ -184,8 +189,13 @@ public abstract class AbstractServicePro
         SamlRequestInfo info = new SamlRequestInfo();
         info.setSamlRequest(authnRequestEncoded);
         
-        String httpBasePath = (String)m.get("http.base.path");
-        String webAppContext = URI.create(httpBasePath).getRawPath();
+        String webAppContext = null;
+        if (addEndpointAddressToContext) {
+            webAppContext = new UriInfoImpl(m).getBaseUri().getRawPath();
+        } else {
+            String httpBasePath = (String)m.get("http.base.path");
+            webAppContext = URI.create(httpBasePath).getRawPath();
+        }
         String originalRequestURI = new UriInfoImpl(m).getRequestUri().toString();
         
         RequestState requestState = new RequestState(originalRequestURI,



Mime
View raw message