Author: anil.saldhana(a)jboss.com
Date: 2011-04-25 23:59:17 -0400 (Mon, 25 Apr 2011)
New Revision: 916
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java
Log:
use ws-policy applies to
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java 2011-04-26
03:34:11 UTC (rev 915)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/STSClient.java 2011-04-26
03:59:17 UTC (rev 916)
@@ -36,6 +36,7 @@
import org.picketlink.identity.federation.core.parsers.wst.WSTrustParser;
import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
+import org.picketlink.identity.federation.core.util.StringUtil;
import org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityToken;
import
org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenResponse;
import
org.picketlink.identity.federation.core.wstrust.wrappers.RequestSecurityTokenResponseCollection;
@@ -217,8 +218,12 @@
private RequestSecurityToken setAppliesTo(String endpointURI, RequestSecurityToken
rst)
{
- if (endpointURI != null)
+ if (StringUtil.isNotNull(wspAppliesTo))
+ {
rst.setAppliesTo(WSTrustUtil.createAppliesTo(endpointURI));
+ }
+ else if (endpointURI != null)
+ rst.setAppliesTo(WSTrustUtil.createAppliesTo(endpointURI));
return rst;
}