You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2011/10/10 14:13:29 UTC

svn commit: r1180910 - in /cxf/trunk: rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/ systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth/

Author: sergeyb
Date: Mon Oct 10 12:13:28 2011
New Revision: 1180910

URL: http://svn.apache.org/viewvc?rev=1180910&view=rev
Log:
[CXF-2759] Adding optional HTTP verb handlers to Request & Access token services

Modified:
    cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AccessTokenService.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java
    cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth/TemporaryCredentialServiceTest.java

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AccessTokenService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AccessTokenService.java?rev=1180910&r1=1180909&r2=1180910&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AccessTokenService.java (original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AccessTokenService.java Mon Oct 10 12:13:28 2011
@@ -20,6 +20,7 @@
 package org.apache.cxf.rs.security.oauth.services;
 
 import javax.ws.rs.GET;
+import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Response;
@@ -39,6 +40,12 @@ public class AccessTokenService extends 
     
     @GET
     @Produces("application/x-www-form-urlencoded")
+    public Response getAccessTokenWithGET() {
+        return handler.handle(getHttpRequest(), getDataProvider());
+    }
+    
+    @POST
+    @Produces("application/x-www-form-urlencoded")
     public Response getAccessToken() {
         return handler.handle(getHttpRequest(), getDataProvider());
     }

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java?rev=1180910&r1=1180909&r2=1180910&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java (original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/RequestTokenService.java Mon Oct 10 12:13:28 2011
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.rs.security.oauth.services;
 
+import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
@@ -38,6 +39,12 @@ public class RequestTokenService extends
         this.handler = h;
     }
     
+    @GET
+    @Produces("application/x-www-form-urlencoded")
+    public Response getRequestTokenWithGET() {
+        return handler.handle(getHttpRequest(), getDataProvider());
+    }
+    
     @POST
     @Produces("application/x-www-form-urlencoded")
     public Response getRequestToken() {

Modified: cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth/TemporaryCredentialServiceTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth/TemporaryCredentialServiceTest.java?rev=1180910&r1=1180909&r2=1180910&view=diff
==============================================================================
--- cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth/TemporaryCredentialServiceTest.java (original)
+++ cxf/trunk/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth/TemporaryCredentialServiceTest.java Mon Oct 10 12:13:28 2011
@@ -61,7 +61,7 @@ public class TemporaryCredentialServiceT
         Map<String, String> parameters = new HashMap<String, String>();
         parameters.put(OAuth.OAUTH_CALLBACK, OAuthTestUtils.CALLBACK);
         
-        //check all parameter transimssions
+        //check all parameter transmissions
         for (ParameterStyle style : ParameterStyle.values()) {
             //for all signing methods
             for (String signMethod : OAuthTestUtils.SIGN_METHOD) {