cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing 2.7.x JAXRS spring security demo
Date Wed, 20 May 2015 11:02:56 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 8c4d3f7f7 -> fb302eaf3


Fixing 2.7.x JAXRS spring security demo


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/fb302eaf
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/fb302eaf
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/fb302eaf

Branch: refs/heads/2.7.x-fixes
Commit: fb302eaf35050d0c4f687b7282b126504e0d97e7
Parents: 8c4d3f7
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed May 20 12:02:36 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed May 20 12:02:36 2015 +0100

----------------------------------------------------------------------
 .../samples/jax_rs/spring_security/pom.xml      | 12 ++++++++++-
 .../jaxrs/service/CustomerServiceSecured.java   |  2 +-
 .../src/main/webapp/WEB-INF/beans.xml           | 21 ++++++++++----------
 3 files changed, 23 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/fb302eaf/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml b/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
index ce4916f..774f6b1 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/spring_security/pom.xml
@@ -142,7 +142,17 @@
 
         <dependency>
            <groupId>org.springframework.security</groupId>
-           <artifactId>spring-security-core-tiger</artifactId>
+           <artifactId>spring-security-config</artifactId>
+        </dependency> 
+
+        <dependency>
+           <groupId>org.springframework.security</groupId>
+           <artifactId>spring-security-web</artifactId>
+        </dependency> 
+
+        <dependency>
+           <groupId>org.springframework.security</groupId>
+           <artifactId>spring-security-core</artifactId>
         </dependency> 
 
         <dependency>

http://git-wip-us.apache.org/repos/asf/cxf/blob/fb302eaf/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
b/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
index 56bab23..699a448 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
+++ b/distribution/src/main/release/samples/jax_rs/spring_security/src/main/java/demo/jaxrs/service/CustomerServiceSecured.java
@@ -19,7 +19,7 @@
 package demo.jaxrs.service;
 
 import javax.ws.rs.core.Response;
-import org.springframework.security.annotation.Secured;
+import org.springframework.security.access.annotation.Secured;
 
 
 public interface CustomerServiceSecured {

http://git-wip-us.apache.org/repos/asf/cxf/blob/fb302eaf/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
b/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
index b2eb1e7..8a62741 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
+++ b/distribution/src/main/release/samples/jax_rs/spring_security/src/main/webapp/WEB-INF/beans.xml
@@ -28,7 +28,7 @@ http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/aop 
 http://www.springframework.org/schema/aop/spring-aop.xsd
 http://www.springframework.org/schema/security 
-http://www.springframework.org/schema/security/spring-security-2.0.4.xsd
+http://www.springframework.org/schema/security/spring-security.xsd
 http://cxf.apache.org/jaxrs
 http://cxf.apache.org/schemas/jaxrs.xsd">
 
@@ -53,7 +53,7 @@ http://cxf.apache.org/schemas/jaxrs.xsd">
   <security:global-method-security secured-annotations="enabled">
       <security:protect-pointcut 
         expression="execution(* demo.jaxrs.service.CustomerService.getCustomer(*))" 
-        access="ROLE_CUSTOMER, ROLE_ADMIN"/>
+        access="ROLE_CUSTOMER,ROLE_ADMIN"/>
       <security:protect-pointcut 
         expression="execution(* demo.jaxrs.service.CustomerService.addCustomer(*))" 
         access="ROLE_ADMIN"/>
@@ -65,18 +65,19 @@ http://cxf.apache.org/schemas/jaxrs.xsd">
         access="ROLE_ADMIN"/>    
       <security:protect-pointcut 
         expression="execution(* demo.jaxrs.service.CustomerService.getOrder(*))" 
-        access="ROLE_CUSTOMER, ROLE_ADMIN"/> 
+        access="ROLE_CUSTOMER,ROLE_ADMIN"/> 
   </security:global-method-security>
   
   <security:http auto-config='true'>
     <security:http-basic />
   </security:http>
-  
-  <security:authentication-provider>
-    <security:user-service>
-      <security:user name="bob" password="bobspassword" authorities="ROLE_CUSTOMER" />
-      <security:user name="fred" password="fredspassword" authorities="ROLE_CUSTOMER,
ROLE_ADMIN" />
-    </security:user-service>
-  </security:authentication-provider> 
+  <security:authentication-manager>
+    <security:authentication-provider>
+      <security:user-service>
+        <security:user name="bob" password="bobspassword" authorities="ROLE_CUSTOMER"
/>
+        <security:user name="fred" password="fredspassword" authorities="ROLE_CUSTOMER,ROLE_ADMIN"
/>
+      </security:user-service>
+    </security:authentication-provider> 
+  </security:authentication-manager>
 </beans>
 


Mime
View raw message