[SCB-2733]provide edge service and resource server project (#36)
diff --git a/README.md b/README.md
index d013c87..2e070bf 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
## Project description
-This project contains api, authentication-server and samples folders. Api folder contains components used in Authentication Server, Edge Service and Resource Server. Authentcation Server imeplentation is based on api. And samples folder gives a working example showing how to use these apis.
+This project contains authentication-server, resource server and edge service.
* Prepare
@@ -45,5 +45,4 @@
## Contact Us
* [issues](https://issues.apache.org/jira/browse/SCB)
-* [gitter](https://gitter.im/ServiceCombUsers/Lobby)
* mailing list: [subscribe](mailto:dev-subscribe@servicecomb.apache.org) [view](https://lists.apache.org/list.html?dev@servicecomb.apache.org)
diff --git a/README_ZH.md b/README_ZH.md
index febc7c3..831c8f9 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -13,7 +13,7 @@
## 项目说明
-项目包含了authentication-server,api和samples等目录。其中api目录主要提供给Authentication Server, Edge Service and Resource Server使用的api,authentication-server基于api实现, samples目录基于api提供一个完整的开发示例。
+项目包含了authentication-server,resource-server和edge-service 3个子项目,分工协作完成使用微服务架构的认证鉴权方案。
* 准备
@@ -46,5 +46,4 @@
## 联系我们
* [提交issues](https://issues.apache.org/jira/browse/SCB)
-* [gitter聊天室](https://gitter.im/ServiceCombUsers/Lobby)
* 邮件列表: [订阅](mailto:dev-subscribe@servicecomb.apache.org) [浏览](https://lists.apache.org/list.html?dev@servicecomb.apache.org)
diff --git a/build_and_run.bat b/build_and_run.bat
index 979f8ce..53e5696 100644
--- a/build_and_run.bat
+++ b/build_and_run.bat
@@ -8,13 +8,13 @@
cd %HOME%\authentication-server\target
start java -jar authentication-server-0.0.1-SNAPSHOT.jar
-cd %HOME%\samples\EdgeService\target
+cd %HOME%\edge-service\target
start java -jar edge-service-0.0.1-SNAPSHOT.jar
-cd %HOME%\samples\ResourceServer\target
+cd %HOME%\resource-server\target
start java -jar resource-server-0.0.1-SNAPSHOT.jar
-cd %HOME%\samples\Client\target
+cd %HOME%\integration-tests\target
start java -jar client-0.0.1-SNAPSHOT.jar
-cd %HOME%
\ No newline at end of file
+cd %HOME%
diff --git a/samples/EdgeService/pom.xml b/edge-service/pom.xml
similarity index 100%
rename from samples/EdgeService/pom.xml
rename to edge-service/pom.xml
diff --git a/samples/EdgeService/src/main/java/org/apache/servicecomb/authentication/gateway/AuthenticationConfiguration.java b/edge-service/src/main/java/org/apache/servicecomb/authentication/gateway/AuthenticationConfiguration.java
similarity index 100%
rename from samples/EdgeService/src/main/java/org/apache/servicecomb/authentication/gateway/AuthenticationConfiguration.java
rename to edge-service/src/main/java/org/apache/servicecomb/authentication/gateway/AuthenticationConfiguration.java
diff --git a/samples/EdgeService/src/main/java/org/apache/servicecomb/authentication/gateway/AuthenticationEdgeMain.java b/edge-service/src/main/java/org/apache/servicecomb/authentication/gateway/AuthenticationEdgeMain.java
similarity index 100%
rename from samples/EdgeService/src/main/java/org/apache/servicecomb/authentication/gateway/AuthenticationEdgeMain.java
rename to edge-service/src/main/java/org/apache/servicecomb/authentication/gateway/AuthenticationEdgeMain.java
diff --git a/samples/EdgeService/src/main/java/org/apache/servicecomb/authentication/gateway/EdgeSSLCustom.java b/edge-service/src/main/java/org/apache/servicecomb/authentication/gateway/EdgeSSLCustom.java
similarity index 100%
rename from samples/EdgeService/src/main/java/org/apache/servicecomb/authentication/gateway/EdgeSSLCustom.java
rename to edge-service/src/main/java/org/apache/servicecomb/authentication/gateway/EdgeSSLCustom.java
diff --git a/samples/EdgeService/src/main/java/org/apache/servicecomb/authentication/gateway/StaticWebpageDispatcher.java b/edge-service/src/main/java/org/apache/servicecomb/authentication/gateway/StaticWebpageDispatcher.java
similarity index 100%
rename from samples/EdgeService/src/main/java/org/apache/servicecomb/authentication/gateway/StaticWebpageDispatcher.java
rename to edge-service/src/main/java/org/apache/servicecomb/authentication/gateway/StaticWebpageDispatcher.java
diff --git a/samples/EdgeService/src/main/resources/META-INF/services/org.apache.servicecomb.transport.rest.vertx.VertxHttpDispatcher b/edge-service/src/main/resources/META-INF/services/org.apache.servicecomb.transport.rest.vertx.VertxHttpDispatcher
similarity index 100%
rename from samples/EdgeService/src/main/resources/META-INF/services/org.apache.servicecomb.transport.rest.vertx.VertxHttpDispatcher
rename to edge-service/src/main/resources/META-INF/services/org.apache.servicecomb.transport.rest.vertx.VertxHttpDispatcher
diff --git a/samples/EdgeService/src/main/resources/log4j2.xml b/edge-service/src/main/resources/log4j2.xml
similarity index 100%
rename from samples/EdgeService/src/main/resources/log4j2.xml
rename to edge-service/src/main/resources/log4j2.xml
diff --git a/samples/EdgeService/src/main/resources/microservice.yaml b/edge-service/src/main/resources/microservice.yaml
similarity index 100%
rename from samples/EdgeService/src/main/resources/microservice.yaml
rename to edge-service/src/main/resources/microservice.yaml
diff --git a/samples/EdgeService/src/main/resources/ui/css/style.css b/edge-service/src/main/resources/ui/css/style.css
similarity index 100%
rename from samples/EdgeService/src/main/resources/ui/css/style.css
rename to edge-service/src/main/resources/ui/css/style.css
diff --git a/samples/EdgeService/src/main/resources/ui/githubLoginCallback.html b/edge-service/src/main/resources/ui/githubLoginCallback.html
similarity index 100%
rename from samples/EdgeService/src/main/resources/ui/githubLoginCallback.html
rename to edge-service/src/main/resources/ui/githubLoginCallback.html
diff --git a/samples/EdgeService/src/main/resources/ui/js/jquery-1.11.1.min.js b/edge-service/src/main/resources/ui/js/jquery-1.11.1.min.js
similarity index 100%
rename from samples/EdgeService/src/main/resources/ui/js/jquery-1.11.1.min.js
rename to edge-service/src/main/resources/ui/js/jquery-1.11.1.min.js
diff --git a/samples/EdgeService/src/main/resources/ui/js/login.js b/edge-service/src/main/resources/ui/js/login.js
similarity index 100%
rename from samples/EdgeService/src/main/resources/ui/js/login.js
rename to edge-service/src/main/resources/ui/js/login.js
diff --git a/samples/EdgeService/src/main/resources/ui/js/operation.js b/edge-service/src/main/resources/ui/js/operation.js
similarity index 100%
rename from samples/EdgeService/src/main/resources/ui/js/operation.js
rename to edge-service/src/main/resources/ui/js/operation.js
diff --git a/samples/EdgeService/src/main/resources/ui/login.html b/edge-service/src/main/resources/ui/login.html
similarity index 100%
rename from samples/EdgeService/src/main/resources/ui/login.html
rename to edge-service/src/main/resources/ui/login.html
diff --git a/samples/EdgeService/src/main/resources/ui/operation.html b/edge-service/src/main/resources/ui/operation.html
similarity index 100%
rename from samples/EdgeService/src/main/resources/ui/operation.html
rename to edge-service/src/main/resources/ui/operation.html
diff --git a/samples/EdgeService/test/org/apache/servicecomb/authentication/test/PatternTest.java b/edge-service/test/org/apache/servicecomb/authentication/test/PatternTest.java
similarity index 100%
rename from samples/EdgeService/test/org/apache/servicecomb/authentication/test/PatternTest.java
rename to edge-service/test/org/apache/servicecomb/authentication/test/PatternTest.java
diff --git a/samples/Client/pom.xml b/integration-tests/pom.xml
similarity index 100%
rename from samples/Client/pom.xml
rename to integration-tests/pom.xml
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/AuthenticationClientMain.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/AuthenticationClientMain.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/AuthenticationClientMain.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/AuthenticationClientMain.java
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/AuthenticationTestCase.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/AuthenticationTestCase.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/AuthenticationTestCase.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/AuthenticationTestCase.java
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/BootEventListener.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/BootEventListener.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/BootEventListener.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/BootEventListener.java
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/GateRestTemplate.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/GateRestTemplate.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/GateRestTemplate.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/GateRestTemplate.java
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/ITUriTemplateHandler.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/ITUriTemplateHandler.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/ITUriTemplateHandler.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/ITUriTemplateHandler.java
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/TestCase.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/TestCase.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/TestCase.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/TestCase.java
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/TestEndpoint.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/TestEndpoint.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/TestEndpoint.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/TestEndpoint.java
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/TestMgr.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/TestMgr.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/TestMgr.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/TestMgr.java
diff --git a/samples/Client/src/main/java/org/apache/servicecomb/authentication/TokenExpireTestCase.java b/integration-tests/src/main/java/org/apache/servicecomb/authentication/TokenExpireTestCase.java
similarity index 100%
rename from samples/Client/src/main/java/org/apache/servicecomb/authentication/TokenExpireTestCase.java
rename to integration-tests/src/main/java/org/apache/servicecomb/authentication/TokenExpireTestCase.java
diff --git a/samples/Client/src/main/resources/log4j2.xml b/integration-tests/src/main/resources/log4j2.xml
similarity index 100%
rename from samples/Client/src/main/resources/log4j2.xml
rename to integration-tests/src/main/resources/log4j2.xml
diff --git a/samples/Client/src/main/resources/microservice.yaml b/integration-tests/src/main/resources/microservice.yaml
similarity index 100%
rename from samples/Client/src/main/resources/microservice.yaml
rename to integration-tests/src/main/resources/microservice.yaml
diff --git a/pom.xml b/pom.xml
index 5f47c88..e528290 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,8 +32,10 @@
<modules>
<module>api</module>
+ <module>edge-service</module>
<module>authentication-server</module>
- <module>samples</module>
+ <module>resource-server</module>
+ <module>integration-tests</module>
</modules>
<dependencyManagement>
diff --git a/samples/ResourceServer/pom.xml b/resource-server/pom.xml
similarity index 100%
rename from samples/ResourceServer/pom.xml
rename to resource-server/pom.xml
diff --git a/samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/AuthenticationConfiguration.java b/resource-server/src/main/java/org/apache/servicecomb/authentication/resource/AuthenticationConfiguration.java
similarity index 100%
rename from samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/AuthenticationConfiguration.java
rename to resource-server/src/main/java/org/apache/servicecomb/authentication/resource/AuthenticationConfiguration.java
diff --git a/samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/FileEndpoint.java b/resource-server/src/main/java/org/apache/servicecomb/authentication/resource/FileEndpoint.java
similarity index 100%
rename from samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/FileEndpoint.java
rename to resource-server/src/main/java/org/apache/servicecomb/authentication/resource/FileEndpoint.java
diff --git a/samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/FileStoreService.java b/resource-server/src/main/java/org/apache/servicecomb/authentication/resource/FileStoreService.java
similarity index 100%
rename from samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/FileStoreService.java
rename to resource-server/src/main/java/org/apache/servicecomb/authentication/resource/FileStoreService.java
diff --git a/samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/HandlerAuthEndpoint.java b/resource-server/src/main/java/org/apache/servicecomb/authentication/resource/HandlerAuthEndpoint.java
similarity index 100%
rename from samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/HandlerAuthEndpoint.java
rename to resource-server/src/main/java/org/apache/servicecomb/authentication/resource/HandlerAuthEndpoint.java
diff --git a/samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/LocalFileStoreService.java b/resource-server/src/main/java/org/apache/servicecomb/authentication/resource/LocalFileStoreService.java
similarity index 100%
rename from samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/LocalFileStoreService.java
rename to resource-server/src/main/java/org/apache/servicecomb/authentication/resource/LocalFileStoreService.java
diff --git a/samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/MethodSecurityConfiguration.java b/resource-server/src/main/java/org/apache/servicecomb/authentication/resource/MethodSecurityConfiguration.java
similarity index 100%
rename from samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/MethodSecurityConfiguration.java
rename to resource-server/src/main/java/org/apache/servicecomb/authentication/resource/MethodSecurityConfiguration.java
diff --git a/samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/PreMethodAuthEndpoint.java b/resource-server/src/main/java/org/apache/servicecomb/authentication/resource/PreMethodAuthEndpoint.java
similarity index 100%
rename from samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/PreMethodAuthEndpoint.java
rename to resource-server/src/main/java/org/apache/servicecomb/authentication/resource/PreMethodAuthEndpoint.java
diff --git a/samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/ResourceServerMain.java b/resource-server/src/main/java/org/apache/servicecomb/authentication/resource/ResourceServerMain.java
similarity index 100%
rename from samples/ResourceServer/src/main/java/org/apache/servicecomb/authentication/resource/ResourceServerMain.java
rename to resource-server/src/main/java/org/apache/servicecomb/authentication/resource/ResourceServerMain.java
diff --git a/samples/ResourceServer/src/main/resources/log4j2.xml b/resource-server/src/main/resources/log4j2.xml
similarity index 100%
rename from samples/ResourceServer/src/main/resources/log4j2.xml
rename to resource-server/src/main/resources/log4j2.xml
diff --git a/samples/ResourceServer/src/main/resources/microservice.yaml b/resource-server/src/main/resources/microservice.yaml
similarity index 100%
rename from samples/ResourceServer/src/main/resources/microservice.yaml
rename to resource-server/src/main/resources/microservice.yaml
diff --git a/samples/pom.xml b/samples/pom.xml
deleted file mode 100644
index c4a13e2..0000000
--- a/samples/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.servicecomb.authentication</groupId>
- <artifactId>authentication-parent</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
-
- <artifactId>authentication-samples</artifactId>
- <packaging>pom</packaging>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <modules>
- <module>ResourceServer</module>
- <module>EdgeService</module>
- <module>Client</module>
- </modules>
-</project>
\ No newline at end of file