Author: sergeyb
Date: Tue May 22 10:32:05 2012
New Revision: 1341393
URL: http://svn.apache.org/viewvc?rev=1341393&view=rev
Log:
Update for the apps running on diff contexts to share the security context
based on the domain name only
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=1341393&r1=1341392&r2=1341393&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
Tue May 22 10:32:05 2012
@@ -68,10 +68,12 @@ public abstract class AbstractServicePro
private String idpServiceAddress;
private String issuerId;
private String assertionConsumerServiceAddress;
- private String webAppDomain;
private AuthnRequestBuilder authnRequestBuilder = new
DefaultAuthnRequestBuilder();
private boolean signRequest;
private String signatureUsername;
+
+ private String webAppDomain;
+ private boolean addWebAppContext = true;
private boolean addEndpointAddressToContext;
public void setAddEndpointAddressToContext(boolean add) {
@@ -305,11 +307,15 @@ public abstract class AbstractServicePro
}
private String getWebAppContext(Message m) {
- if (addEndpointAddressToContext) {
- return new UriInfoImpl(m).getBaseUri().getRawPath();
+ if (addWebAppContext) {
+ if (addEndpointAddressToContext) {
+ return new UriInfoImpl(m).getBaseUri().getRawPath();
+ } else {
+ String httpBasePath = (String)m.get("http.base.path");
+ return URI.create(httpBasePath).getRawPath();
+ }
} else {
- String httpBasePath = (String)m.get("http.base.path");
- return URI.create(httpBasePath).getRawPath();
+ return "/";
}
}
@@ -320,5 +326,9 @@ public abstract class AbstractServicePro
public void setWebAppDomain(String webAppDomain) {
this.webAppDomain = webAppDomain;
}
+
+ public void setAddWebAppContext(boolean addWebAppContext) {
+ this.addWebAppContext = addWebAppContext;
+ }
}