cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1177361 - in /cxf/trunk/distribution/src/main/release/samples/oauth: client/src/main/java/demo/oauth/client/controllers/ server/src/main/java/demo/oauth/server/ server/src/main/java/demo/oauth/server/controllers/ server/src/main/java/demo/...
Date Thu, 29 Sep 2011 16:45:22 GMT
Author: sergeyb
Date: Thu Sep 29 16:45:21 2011
New Revision: 1177361

URL: http://svn.apache.org/viewvc?rev=1177361&view=rev
Log:
Fixing checkstyle errors in the OAuth demo

Modified:
    cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/AuthorizeResourceOwnerController.java
    cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/CallbackURLController.java
    cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/GetProtectedResourceController.java
    cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TemporaryCredentialsController.java
    cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TokenRequestController.java
    cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java
    cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/SampleResourceProvider.java
    cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java
    cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/SampleOAuthDataProvider.java
    cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationFailureHandler.java
    cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationSuccessfullHandler.java

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/AuthorizeResourceOwnerController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/AuthorizeResourceOwnerController.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/AuthorizeResourceOwnerController.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/AuthorizeResourceOwnerController.java
Thu Sep 29 16:45:21 2011
@@ -20,12 +20,13 @@ package demo.oauth.client.controllers;
 
 import javax.servlet.http.HttpServletResponse;
 
-import demo.oauth.client.model.OAuthParams;
-
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 
+import demo.oauth.client.model.OAuthParams;
+
+
 @Controller
 public class AuthorizeResourceOwnerController {
 
@@ -45,7 +46,7 @@ public class AuthorizeResourceOwnerContr
 
         response
             .sendRedirect(
-                new StringBuilder().append(resourceOwnerAuthorizationEndpoint).append
-                    ("?oauth_token=").append(oauthToken).toString());
+                new StringBuilder().append(resourceOwnerAuthorizationEndpoint).
+                    append("?oauth_token=").append(oauthToken).toString());
     }
 }

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/CallbackURLController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/CallbackURLController.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/CallbackURLController.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/CallbackURLController.java
Thu Sep 29 16:45:21 2011
@@ -20,9 +20,6 @@ package demo.oauth.client.controllers;
 
 import javax.servlet.http.HttpServletRequest;
 
-import demo.oauth.client.model.Common;
-import demo.oauth.client.model.OAuthParams;
-
 import net.oauth.OAuth;
 import net.oauth.OAuthMessage;
 import net.oauth.OAuthProblemException;
@@ -33,6 +30,10 @@ import org.springframework.web.bind.anno
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.servlet.ModelAndView;
 
+import demo.oauth.client.model.Common;
+import demo.oauth.client.model.OAuthParams;
+
+
 
 @Controller
 public class CallbackURLController {

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/GetProtectedResourceController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/GetProtectedResourceController.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/GetProtectedResourceController.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/GetProtectedResourceController.java
Thu Sep 29 16:45:21 2011
@@ -27,8 +27,6 @@ import java.util.Map;
 import java.util.UUID;
 import javax.servlet.http.HttpServletRequest;
 
-import demo.oauth.client.model.OAuthParams;
-
 import net.oauth.OAuth;
 import net.oauth.OAuthAccessor;
 import net.oauth.OAuthConsumer;
@@ -44,6 +42,7 @@ import org.springframework.web.bind.anno
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.servlet.ModelAndView;
 
+import demo.oauth.client.model.OAuthParams;
 
 @Controller
 public class GetProtectedResourceController {

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TemporaryCredentialsController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TemporaryCredentialsController.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TemporaryCredentialsController.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TemporaryCredentialsController.java
Thu Sep 29 16:45:21 2011
@@ -24,8 +24,6 @@ import java.util.UUID;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
-import demo.oauth.client.model.OAuthParams;
-
 import net.oauth.OAuth;
 import net.oauth.OAuthAccessor;
 import net.oauth.OAuthConsumer;
@@ -35,12 +33,13 @@ import net.oauth.ParameterStyle;
 import net.oauth.client.OAuthClient;
 import net.oauth.client.URLConnectionClient;
 
-
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.servlet.ModelAndView;
 
+import demo.oauth.client.model.OAuthParams;
+
 @Controller
 public class TemporaryCredentialsController {
 

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TokenRequestController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TokenRequestController.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TokenRequestController.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/client/src/main/java/demo/oauth/client/controllers/TokenRequestController.java
Thu Sep 29 16:45:21 2011
@@ -23,10 +23,6 @@ import java.util.Map;
 import java.util.UUID;
 import javax.servlet.http.HttpServletRequest;
 
-import demo.oauth.client.model.Common;
-import demo.oauth.client.model.OAuthParams;
-
-
 import net.oauth.OAuth;
 import net.oauth.OAuthAccessor;
 import net.oauth.OAuthConsumer;
@@ -35,12 +31,15 @@ import net.oauth.OAuthServiceProvider;
 import net.oauth.client.OAuthClient;
 import net.oauth.client.URLConnectionClient;
 
-
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.servlet.ModelAndView;
 
+import demo.oauth.client.model.Common;
+import demo.oauth.client.model.OAuthParams;
+
+
 @Controller
 public class TokenRequestController {
 

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/CustomAuth.java
Thu Sep 29 16:45:21 2011
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software 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
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * 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
+ * "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
+ * under the License.
+ */
 package demo.oauth.server;
 
 import java.io.IOException;

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/SampleResourceProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/SampleResourceProvider.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/SampleResourceProvider.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/SampleResourceProvider.java
Thu Sep 29 16:45:21 2011
@@ -18,7 +18,6 @@
  */
 package demo.oauth.server;
 
-import javax.annotation.security.RolesAllowed;
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
@@ -39,7 +38,7 @@ public class SampleResourceProvider {
     @GET
     @Produces("text/html")
     @Path("/person/get/{name}")
-    @Secured ({"ROLE_USER"})
+    @Secured({"ROLE_USER" })
     public Response getInfo(@PathParam("name") String name, @Context HttpServletRequest request)
{
         return Response.ok("Successfully accessed OAuth protected person: " + name).build();
     }
@@ -47,7 +46,7 @@ public class SampleResourceProvider {
     @POST
     @Produces("text/html")
     @Path("/person/modify/{name}")
-    @Secured( {"ROLE_ADMIN"})
+    @Secured({"ROLE_ADMIN" })
     public Response modifyInfo(@PathParam("name") String name, @Context HttpServletRequest
request) {
         return Response.ok("Successfully modified OAuth protected person: " + name).build();
     }

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/ApplicationController.java
Thu Sep 29 16:45:21 2011
@@ -24,12 +24,11 @@ import java.util.Set;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 
-import demo.oauth.server.ClientApp;
 import org.apache.cxf.common.util.StringUtils;
 
 import org.apache.cxf.rs.security.oauth.data.Client;
-import org.apache.cxf.rs.security.oauth.provider.OAuthDataProvider;
 import org.apache.cxf.rs.security.oauth.provider.MD5TokenGenerator;
+import org.apache.cxf.rs.security.oauth.provider.OAuthDataProvider;
 import org.apache.cxf.rs.security.oauth.utils.OAuthUtils;
 
 import org.springframework.security.core.context.SecurityContextHolder;
@@ -40,6 +39,8 @@ import org.springframework.web.context.S
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.view.RedirectView;
 
+import demo.oauth.server.ClientApp;
+
 @Controller
 public class ApplicationController implements ServletContextAware {
 

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/SampleOAuthDataProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/SampleOAuthDataProvider.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/SampleOAuthDataProvider.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/controllers/SampleOAuthDataProvider.java
Thu Sep 29 16:45:21 2011
@@ -24,7 +24,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.cxf.rs.security.oauth.data.Client;
-import org.apache.cxf.rs.security.oauth.data.OAuthPermission;
 import org.apache.cxf.rs.security.oauth.data.Token;
 
 public class SampleOAuthDataProvider extends MemoryOAuthDataProvider

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationFailureHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationFailureHandler.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationFailureHandler.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationFailureHandler.java
Thu Sep 29 16:45:21 2011
@@ -51,8 +51,7 @@ public class AuthenticationFailureHandle
         }
 
         if (!StringUtils.isEmpty(xScope)) {
-            url.append("&").append(OAuthConstants.X_OAUTH_SCOPE).append("=").append
-                (xScope);
+            url.append("&").append(OAuthConstants.X_OAUTH_SCOPE).append("=").append(xScope);
         }
 
         setDefaultFailureUrl(url.toString());

Modified: cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationSuccessfullHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationSuccessfullHandler.java?rev=1177361&r1=1177360&r2=1177361&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationSuccessfullHandler.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/oauth/server/src/main/java/demo/oauth/server/spring/AuthenticationSuccessfullHandler.java
Thu Sep 29 16:45:21 2011
@@ -53,8 +53,7 @@ public class AuthenticationSuccessfullHa
             return super.determineTargetUrl(request, response);
         }
 
-        StringBuffer url = new StringBuffer(confirmationUrl).append("?").append(OAuth.OAUTH_TOKEN).append
-                ("=")
+        StringBuffer url = new StringBuffer(confirmationUrl).append("?").append(OAuth.OAUTH_TOKEN).append("=")
                 .append(oauthToken).append("&").append(OAuthConstants.AUTHENTICITY_TOKEN)
                 .append("=")
                 .append(authToken);
@@ -70,8 +69,7 @@ public class AuthenticationSuccessfullHa
         }
 
         if (!StringUtils.isEmpty(xScope)) {
-            url.append("&").append(OAuthConstants.X_OAUTH_SCOPE).append("=").append
-                (xScope);
+            url.append("&").append(OAuthConstants.X_OAUTH_SCOPE).append("=").append(xScope);
         }
 
         return url.toString();



Mime
View raw message