Author: anil.saldhana(a)jboss.com
Date: 2010-06-30 18:33:58 -0400 (Wed, 30 Jun 2010)
New Revision: 323
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderBaseProcessor.java
Log:
PLFED-95: saml authn request should set destination
Modified:
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java
===================================================================
---
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2010-06-30
21:59:46 UTC (rev 322)
+++
federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/bindings/tomcat/sp/SPPostFormAuthenticator.java 2010-06-30
22:33:58 UTC (rev 323)
@@ -125,9 +125,9 @@
try
{
ServiceProviderBaseProcessor baseProcessor = new
ServiceProviderBaseProcessor(true, serviceURL);
+ baseProcessor.setIdentityURL( identityURL );
- saml2HandlerResponse = baseProcessor.process(httpContext, handlers,
chainLock);
- saml2HandlerResponse.setDestination(identityURL);
+ saml2HandlerResponse = baseProcessor.process(httpContext, handlers,
chainLock);
}
catch(ProcessingException pe)
{
Modified:
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderBaseProcessor.java
===================================================================
---
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderBaseProcessor.java 2010-06-30
21:59:46 UTC (rev 322)
+++
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderBaseProcessor.java 2010-06-30
22:33:58 UTC (rev 323)
@@ -60,6 +60,8 @@
protected boolean postBinding;
protected String serviceURL;
+ protected String identityURL;
+
protected SPType spConfiguration;
protected TrustKeyManager keyManager;
@@ -95,6 +97,15 @@
}
/**
+ * Set the Identity URL
+ * @param identityURL
+ */
+ public void setIdentityURL(String identityURL)
+ {
+ this.identityURL = identityURL;
+ }
+
+ /**
* Whether we support signatures during the current processing
* @param supportSignatures
*/
@@ -118,7 +129,9 @@
//Create the request/response
SAML2HandlerRequest saml2HandlerRequest = getSAML2HandlerRequest(null,httpContext);
- SAML2HandlerResponse saml2HandlerResponse = new DefaultSAML2HandlerResponse();
+ SAML2HandlerResponse saml2HandlerResponse = new DefaultSAML2HandlerResponse();
+
+ saml2HandlerResponse.setDestination( identityURL );
//Reset the state
try
@@ -162,10 +175,9 @@
protected SAML2HandlerRequest getSAML2HandlerRequest(SAMLDocumentHolder
documentHolder,
HTTPContext httpContext)
{
- IssuerInfoHolder holder = new IssuerInfoHolder(this.serviceURL);
+ IssuerInfoHolder holder = new IssuerInfoHolder(this.serviceURL);
- return
- new DefaultSAML2HandlerRequest(httpContext,
+ return new DefaultSAML2HandlerRequest(httpContext,
holder.getIssuer(), documentHolder,
HANDLER_TYPE.SP);
}