Author: anil.saldhana(a)jboss.com
Date: 2010-12-09 14:38:58 -0500 (Thu, 09 Dec 2010)
New Revision: 587
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/JBossSAMLAuthnRequestFactory.java
Log:
dest can be null
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/JBossSAMLAuthnRequestFactory.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/JBossSAMLAuthnRequestFactory.java 2010-12-09
19:38:42 UTC (rev 586)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/factories/JBossSAMLAuthnRequestFactory.java 2010-12-09
19:38:58 UTC (rev 587)
@@ -55,7 +55,7 @@
*/
public static AuthnRequestType createAuthnRequestType(String id,
String assertionConsumerURL, String destination, String issuerValue) throws
ConfigurationException
- {
+ {
XMLGregorianCalendar issueInstant = XMLTimeUtil.getIssueInstant();
AuthnRequestType authnRequest = new AuthnRequestType();
@@ -63,7 +63,10 @@
authnRequest.setVersion(JBossSAMLConstants.VERSION_2_0.get());
authnRequest.setAssertionConsumerServiceURL( NetworkUtil.createURI(
assertionConsumerURL ));
authnRequest.setProtocolBinding( NetworkUtil.createURI(
JBossSAMLConstants.HTTP_POST_BINDING.get() ));
- authnRequest.setDestination( NetworkUtil.createURI( destination ));
+ if( destination != null )
+ {
+ authnRequest.setDestination( NetworkUtil.createURI( destination ));
+ }
authnRequest.setIssueInstant(issueInstant);
//Create an issuer