Author: lmoren
Date: Sat Aug 7 17:20:45 2010
New Revision: 983262
URL: http://svn.apache.org/viewvc?rev=983262&view=rev
Log:
- fixed checkstyles in oauth and aegis modules
Modified:
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/src/demo/hw/server/Server.java
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/testSrc/org/apache/cxf/sample/test/TestAegisSample.java
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/controllers/TokenRequestController.java
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/model/Common.java
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/controllers/ApplicationController.java
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/spring/TargetURLResolver.java
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/webapp/index.jsp
cxf/sandbox/oauth_1.0a/rt/rs/oauth/src/test/resources/oauth-beans.xml
Modified:
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/src/demo/hw/server/Server.java
URL:
http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/src/demo/hw/server/Server.java?rev=983262&r1=983261&r2=983262&view=diff
==============================================================================
---
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/src/demo/hw/server/Server.java
(original)
+++
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/src/demo/hw/server/Server.java
Sat Aug 7 17:20:45 2010
@@ -24,7 +24,7 @@ import org.apache.cxf.frontend.ServerFac
public class Server {
- public Server() throws Exception {
+ protected Server() throws Exception {
HelloWorldImpl helloworldImpl = new HelloWorldImpl();
ServerFactoryBean svrFactory = new ServerFactoryBean();
svrFactory.setServiceClass(HelloWorld.class);
@@ -34,6 +34,10 @@ public class Server {
svrFactory.create();
}
+ public static final Server start() throws Exception {
+ return new Server();
+ }
+
public static void main(String args[]) throws Exception {
new Server();
System.out.println("Server ready...");
Modified:
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/testSrc/org/apache/cxf/sample/test/TestAegisSample.java
URL:
http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/testSrc/org/apache/cxf/sample/test/TestAegisSample.java?rev=983262&r1=983261&r2=983262&view=diff
==============================================================================
---
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/testSrc/org/apache/cxf/sample/test/TestAegisSample.java
(original)
+++
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/aegis/testSrc/org/apache/cxf/sample/test/TestAegisSample.java
Sat Aug 7 17:20:45 2010
@@ -19,21 +19,21 @@
package org.apache.cxf.sample.test;
-import demo.hw.client.Client;
-import demo.hw.server.Server;
-
import org.junit.BeforeClass;
import org.junit.Test;
+import demo.hw.client.Client;
+import demo.hw.server.Server;
+
/**
- *
+ *
*/
public class TestAegisSample {
@BeforeClass
public static void startServer() throws Exception {
- new Server();
+ Server.start();
}
-
+
@Test
public void testClient() throws Exception {
Client.main(null);
Modified:
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/controllers/TokenRequestController.java
URL:
http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/controllers/TokenRequestController.java?rev=983262&r1=983261&r2=983262&view=diff
==============================================================================
---
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/controllers/TokenRequestController.java
(original)
+++
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/controllers/TokenRequestController.java
Sat Aug 7 17:20:45 2010
@@ -47,7 +47,8 @@ import org.springframework.web.servlet.M
public class TokenRequestController {
@RequestMapping("/tokenRequest")
- protected ModelAndView handleRequest(@ModelAttribute("oAuthParams")
OAuthParams oAuthParams, HttpServletRequest request)
+ protected ModelAndView handleRequest(@ModelAttribute("oAuthParams")
OAuthParams oAuthParams,
+ HttpServletRequest request)
throws Exception {
String oauthToken = oAuthParams.getOauthToken();
Modified:
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/model/Common.java
URL:
http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/model/Common.java?rev=983262&r1=983261&r2=983262&view=diff
==============================================================================
---
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/model/Common.java
(original)
+++
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/client/src/main/java/org/apache/cxf/auth/oauth/demo/client/model/Common.java
Sat Aug 7 17:20:45 2010
@@ -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 org.apache.cxf.auth.oauth.demo.client.model;
import javax.servlet.http.Cookie;
@@ -6,7 +24,10 @@ import javax.servlet.http.HttpServletReq
/**
* @author Lukasz Moren
*/
-public class Common {
+public final class Common {
+ private Common() {
+ }
+
public static String findCookieValue(HttpServletRequest request, String
key) {
Cookie[] cookies = request.getCookies();
Modified:
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/controllers/ApplicationController.java
URL:
http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/controllers/ApplicationController.java?rev=983262&r1=983261&r2=983262&view=diff
==============================================================================
---
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/controllers/ApplicationController.java
(original)
+++
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/controllers/ApplicationController.java
Sat Aug 7 17:20:45 2010
@@ -21,13 +21,13 @@ package org.apache.cxf.auth.oauth.demo.s
import java.security.SecureRandom;
import java.util.Set;
+import org.apache.cxf.auth.oauth.demo.server.Application;
import org.apache.cxf.auth.oauth.provider.ClientAuthNInfo;
import org.apache.cxf.auth.oauth.provider.ClientAuthNInfoImpl;
import org.apache.cxf.auth.oauth.provider.OAuthDataProvider;
import org.apache.cxf.auth.oauth.token.MD5TokenGenerator;
import org.apache.cxf.auth.oauth.token.TokenGenerator;
import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.auth.oauth.demo.server.Application;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.context.SecurityContextHolder;
Modified:
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/spring/TargetURLResolver.java
URL:
http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/spring/TargetURLResolver.java?rev=983262&r1=983261&r2=983262&view=diff
==============================================================================
---
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/spring/TargetURLResolver.java
(original)
+++
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/java/org/apache/cxf/auth/oauth/demo/server/spring/TargetURLResolver.java
Sat Aug 7 17:20:45 2010
@@ -20,11 +20,11 @@ package org.apache.cxf.auth.oauth.demo.s
import javax.servlet.http.HttpServletRequest;
+import net.oauth.OAuth;
+
import org.apache.cxf.auth.oauth.endpoints.AuthorizationService;
import org.apache.cxf.common.util.StringUtils;
-import net.oauth.OAuth;
-
import org.springframework.security.Authentication;
import org.springframework.security.ui.TargetUrlResolver;
import org.springframework.security.ui.TargetUrlResolverImpl;
Modified:
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/webapp/index.jsp
URL:
http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/webapp/index.jsp?rev=983262&r1=983261&r2=983262&view=diff
==============================================================================
---
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/webapp/index.jsp
(original)
+++
cxf/sandbox/oauth_1.0a/distribution/src/main/release/samples/oauth_1.0a/server/src/main/webapp/index.jsp
Sat Aug 7 17:20:45 2010
@@ -31,10 +31,10 @@ under the License.
</tr>
<tr align="center">
- <td><h3>OAuth protected resources at: </h3></td>
+ <td><h3>OAuth protected resources at path: </h3></td>
</tr>
<tr align="center">
- <td><input size="70"
value="http://localhost:8081/auth/resources/person/{name}"/><br/><br/>
+ <td><input size="70" value="/auth/resources/person/{name}"/><br/><br/>
You can access this resources by using OAuth client hosted at: <a
href="http://www.oauthclient.appspot.com/">OAuth
client</a></td>
</tr>
Modified: cxf/sandbox/oauth_1.0a/rt/rs/oauth/src/test/resources/oauth-beans.xml
URL:
http://svn.apache.org/viewvc/cxf/sandbox/oauth_1.0a/rt/rs/oauth/src/test/resources/oauth-beans.xml?rev=983262&r1=983261&r2=983262&view=diff
==============================================================================
--- cxf/sandbox/oauth_1.0a/rt/rs/oauth/src/test/resources/oauth-beans.xml
(original)
+++ cxf/sandbox/oauth_1.0a/rt/rs/oauth/src/test/resources/oauth-beans.xml Sat
Aug 7 17:20:45 2010
@@ -80,6 +80,4 @@ under the License.
<constructor-arg value="secret"/>
<constructor-arg value="http://www.example.com/callback"/>
</bean>
-
-
</beans>
\ No newline at end of file