cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1325714 - in /cxf/trunk/services/sts: sts-core/src/main/java/org/apache/cxf/sts/token/provider/ sts-war/ sts-war/src/main/webapp/WEB-INF/ systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/
Date Fri, 13 Apr 2012 10:50:53 GMT
Author: coheigea
Date: Fri Apr 13 10:50:52 2012
New Revision: 1325714

URL: http://svn.apache.org/viewvc?rev=1325714&view=rev
Log:
Fixed sts-war systests + added a NPE guard in the sts-core

Modified:
    cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
    cxf/trunk/services/sts/sts-war/pom.xml
    cxf/trunk/services/sts/sts-war/src/main/webapp/WEB-INF/cxf-transport.xml
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java

Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java?rev=1325714&r1=1325713&r2=1325714&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
(original)
+++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/DefaultSubjectProvider.java
Fri Apr 13 10:50:52 2012
@@ -110,6 +110,11 @@ public class DefaultSubjectProvider impl
             principal = providerParameters.getPrincipal();
         }
         
+        if (principal == null) {
+            LOG.fine("Error in getting principal");
+            throw new STSException("Error in getting principal", STSException.REQUEST_FAILED);
+        }
+        
         SubjectBean subjectBean = 
             new SubjectBean(principal.getName(), subjectNameQualifier, confirmationMethod);
         LOG.fine("Creating new subject with principal name: " + principal.getName());

Modified: cxf/trunk/services/sts/sts-war/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-war/pom.xml?rev=1325714&r1=1325713&r2=1325714&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-war/pom.xml (original)
+++ cxf/trunk/services/sts/sts-war/pom.xml Fri Apr 13 10:50:52 2012
@@ -1,5 +1,5 @@
 <!--
-  Licensed to the Apache Software Foundation (ASF) under one
+  Licensed to the Apache Soft Foundation (ASF) under one
   or more contributor license agreements. See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership. The ASF licenses this file
@@ -10,7 +10,7 @@
   http://www.apache.org/licenses/LICENSE-2.0
  
   Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
+  softwwareare distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied. See the License for the
   specific language governing permissions and limitations
@@ -72,6 +72,10 @@
            <artifactId>hazelcast</artifactId>
            <version>${cxf.hazelcast.version}</version>
         </dependency> 
+        <dependency>
+           <groupId>org.springframework</groupId>
+           <artifactId>spring-web</artifactId>
+        </dependency> 
 
     </dependencies>
 

Modified: cxf/trunk/services/sts/sts-war/src/main/webapp/WEB-INF/cxf-transport.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-war/src/main/webapp/WEB-INF/cxf-transport.xml?rev=1325714&r1=1325713&r2=1325714&view=diff
==============================================================================
--- cxf/trunk/services/sts/sts-war/src/main/webapp/WEB-INF/cxf-transport.xml (original)
+++ cxf/trunk/services/sts/sts-war/src/main/webapp/WEB-INF/cxf-transport.xml Fri Apr 13 10:50:52
2012
@@ -47,6 +47,7 @@
 
 	<bean id="transportIssueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
 		<property name="tokenProviders" ref="transportTokenProviders" />
+		<property name="tokenValidators" ref="transportTokenValidators" />
 		<property name="services" ref="transportService" />
 		<property name="stsProperties" ref="transportSTSProperties" />
 	</bean>

Modified: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java?rev=1325714&r1=1325713&r2=1325714&view=diff
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
(original)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
Fri Apr 13 10:50:52 2012
@@ -84,6 +84,10 @@ public class UsernameOnBehalfOfTest exte
 
     @org.junit.Test
     public void testUsernameOnBehalfOf() throws Exception {
+        // Only run these tests for the standalone scenario.
+        if (!standalone) {
+            return;
+        }
 
         SpringBusFactory bf = new SpringBusFactory();
         URL busFile = UsernameOnBehalfOfTest.class.getResource("cxf-client.xml");
@@ -131,7 +135,11 @@ public class UsernameOnBehalfOfTest exte
      */
     @org.junit.Test
     public void testUsernameOnBehalfOfCaching() throws Exception {
-
+        // Only run these tests for the standalone scenario.
+        if (!standalone) {
+            return;
+        }
+        
         SpringBusFactory bf = new SpringBusFactory();
         URL busFile = UsernameOnBehalfOfTest.class.getResource("cxf-client.xml");
 
@@ -220,7 +228,11 @@ public class UsernameOnBehalfOfTest exte
      */
     @org.junit.Test
     public void testDifferentUsersCaching() throws Exception {
-
+        // Only run these tests for the standalone scenario.
+        if (!standalone) {
+            return;
+        }
+        
         SpringBusFactory bf = new SpringBusFactory();
         URL busFile = UsernameOnBehalfOfTest.class.getResource("cxf-client.xml");
 
@@ -310,7 +322,11 @@ public class UsernameOnBehalfOfTest exte
      */
     @org.junit.Test
     public void testAppliesToCaching() throws Exception {
-
+        // Only run these tests for the standalone scenario.
+        if (!standalone) {
+            return;
+        }
+        
         SpringBusFactory bf = new SpringBusFactory();
         URL busFile = UsernameOnBehalfOfTest.class.getResource("cxf-client.xml");
 
@@ -401,7 +417,11 @@ public class UsernameOnBehalfOfTest exte
      */
     @org.junit.Test
     public void testNoAppliesToCaching() throws Exception {
-
+        // Only run these tests for the standalone scenario.
+        if (!standalone) {
+            return;
+        }
+        
         SpringBusFactory bf = new SpringBusFactory();
         URL busFile = UsernameOnBehalfOfTest.class.getResource("cxf-client.xml");
 



Mime
View raw message