[jboss-cvs] Picketlink SVN: r256 - federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 25 18:16:17 EDT 2010


Author: anil.saldhana at jboss.com
Date: 2010-05-25 18:16:17 -0400 (Tue, 25 May 2010)
New Revision: 256

Modified:
   federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java
Log:
test should always look in its tcl path

Modified: federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java
===================================================================
--- federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java	2010-05-20 21:40:10 UTC (rev 255)
+++ federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/wstrust/PicketLinkSTSUnitTestCase.java	2010-05-25 22:16:17 UTC (rev 256)
@@ -46,11 +46,13 @@
 
 import junit.framework.TestCase;
 
+import org.picketlink.identity.federation.core.config.STSType;
 import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
 import org.picketlink.identity.federation.core.saml.v2.common.IDGenerator;
 import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
 import org.picketlink.identity.federation.core.util.Base64;
 import org.picketlink.identity.federation.core.wstrust.PicketLinkSTS;
+import org.picketlink.identity.federation.core.wstrust.PicketLinkSTSConfiguration;
 import org.picketlink.identity.federation.core.wstrust.STSConfiguration;
 import org.picketlink.identity.federation.core.wstrust.SecurityTokenProvider;
 import org.picketlink.identity.federation.core.wstrust.StandardRequestHandler;
@@ -1383,7 +1385,18 @@
       @Override
       public STSConfiguration getConfiguration() throws ConfigurationException
       {
-         return super.getConfiguration();
+         InputStream stream;
+         try
+         {
+            stream = Thread.currentThread().getContextClassLoader().getResource("picketlink-sts.xml").openStream();
+
+            STSType stsConfig = WSTrustUtil.getSTSConfiguration(stream);
+            return new PicketLinkSTSConfiguration(stsConfig); 
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException( e );
+         } 
       }
 
       public void setContext(WebServiceContext context)




More information about the jboss-cvs-commits mailing list