[SCB-1420]provide authentication server for use(change project pom structure) (#10)
[SCB-1420]provide authentication server for use(change project pom structure) (#10)
diff --git a/api/pom.xml b/api/pom.xml
index 92c7f27..398b086 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -20,9 +20,13 @@
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>
- <groupId>org.apache.servicecomb.authentication</groupId>
+ <parent>
+ <groupId>org.apache.servicecomb.authentication</groupId>
+ <artifactId>authentication-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
<artifactId>authentication-api</artifactId>
- <version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
@@ -35,58 +39,4 @@
<module>resource-server</module>
<module>edge-service</module>
</modules>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.servicecomb</groupId>
- <artifactId>java-chassis-dependencies</artifactId>
- <version>1.2.0</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.servicecomb</groupId>
- <artifactId>solution-basic</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.servicecomb</groupId>
- <artifactId>inspector</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.2.RELEASE</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- <configuration>
- <mainClass>${main.class}</mainClass>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
</project>
\ No newline at end of file
diff --git a/samples/AuthenticationServer/pom.xml b/authentication-server/pom.xml
similarity index 84%
rename from samples/AuthenticationServer/pom.xml
rename to authentication-server/pom.xml
index 488d06d..285d9eb 100644
--- a/samples/AuthenticationServer/pom.xml
+++ b/authentication-server/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.apache.servicecomb.authentication</groupId>
- <artifactId>authentication-samples</artifactId>
+ <artifactId>authentication-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
@@ -136,33 +136,11 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.2.RELEASE</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- <configuration>
- <mainClass>${main.class}</mainClass>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
</project>
\ No newline at end of file
diff --git a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/AuthenticationConfiguration.java b/authentication-server/src/main/java/org/apache/servicecomb/authentication/AuthenticationConfiguration.java
similarity index 100%
rename from samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/AuthenticationConfiguration.java
rename to authentication-server/src/main/java/org/apache/servicecomb/authentication/AuthenticationConfiguration.java
diff --git a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/AuthenticationServerMain.java b/authentication-server/src/main/java/org/apache/servicecomb/authentication/AuthenticationServerMain.java
similarity index 100%
rename from samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/AuthenticationServerMain.java
rename to authentication-server/src/main/java/org/apache/servicecomb/authentication/AuthenticationServerMain.java
diff --git a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCOpenIDTokenStore.java b/authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCOpenIDTokenStore.java
similarity index 100%
rename from samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCOpenIDTokenStore.java
rename to authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCOpenIDTokenStore.java
diff --git a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetails.java b/authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetails.java
similarity index 100%
rename from samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetails.java
rename to authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetails.java
diff --git a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetailsManager.java b/authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetailsManager.java
similarity index 100%
rename from samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetailsManager.java
rename to authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetailsManager.java
diff --git a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/TokenMapper.java b/authentication-server/src/main/java/org/apache/servicecomb/authentication/user/TokenMapper.java
similarity index 100%
rename from samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/TokenMapper.java
rename to authentication-server/src/main/java/org/apache/servicecomb/authentication/user/TokenMapper.java
diff --git a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/UserInfo.java b/authentication-server/src/main/java/org/apache/servicecomb/authentication/user/UserInfo.java
similarity index 100%
rename from samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/UserInfo.java
rename to authentication-server/src/main/java/org/apache/servicecomb/authentication/user/UserInfo.java
diff --git a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/UserMapper.java b/authentication-server/src/main/java/org/apache/servicecomb/authentication/user/UserMapper.java
similarity index 100%
rename from samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/UserMapper.java
rename to authentication-server/src/main/java/org/apache/servicecomb/authentication/user/UserMapper.java
diff --git a/samples/AuthenticationServer/src/main/resources/META-INF/spring/authentication.server.bean.xml b/authentication-server/src/main/resources/META-INF/spring/authentication.server.bean.xml
similarity index 100%
rename from samples/AuthenticationServer/src/main/resources/META-INF/spring/authentication.server.bean.xml
rename to authentication-server/src/main/resources/META-INF/spring/authentication.server.bean.xml
diff --git a/samples/AuthenticationServer/src/main/resources/config/TokenMapper.xml b/authentication-server/src/main/resources/config/TokenMapper.xml
similarity index 100%
rename from samples/AuthenticationServer/src/main/resources/config/TokenMapper.xml
rename to authentication-server/src/main/resources/config/TokenMapper.xml
diff --git a/samples/AuthenticationServer/src/main/resources/config/UserMapper.xml b/authentication-server/src/main/resources/config/UserMapper.xml
similarity index 100%
rename from samples/AuthenticationServer/src/main/resources/config/UserMapper.xml
rename to authentication-server/src/main/resources/config/UserMapper.xml
diff --git a/samples/AuthenticationServer/src/main/resources/config/mybatis-config.xml b/authentication-server/src/main/resources/config/mybatis-config.xml
similarity index 100%
rename from samples/AuthenticationServer/src/main/resources/config/mybatis-config.xml
rename to authentication-server/src/main/resources/config/mybatis-config.xml
diff --git a/samples/AuthenticationServer/src/main/resources/log4j2.xml b/authentication-server/src/main/resources/log4j2.xml
similarity index 100%
rename from samples/AuthenticationServer/src/main/resources/log4j2.xml
rename to authentication-server/src/main/resources/log4j2.xml
diff --git a/samples/AuthenticationServer/src/main/resources/microservice.yaml b/authentication-server/src/main/resources/microservice.yaml
similarity index 82%
rename from samples/AuthenticationServer/src/main/resources/microservice.yaml
rename to authentication-server/src/main/resources/microservice.yaml
index 3e9adc4..f6dc979 100644
--- a/samples/AuthenticationServer/src/main/resources/microservice.yaml
+++ b/authentication-server/src/main/resources/microservice.yaml
@@ -33,7 +33,7 @@
watch: false
rest:
- address: 0.0.0.0:9091
+ address: 0.0.0.0:9061
authentication:
token:
@@ -42,8 +42,9 @@
expiresIn: 3
github:
- clientId: * # change to your github client id
- clientSecret: * # change to your github client secret
+ clientId: 94300caee0725405fde1 # WARNING: change to your github client id
+ clientSecret: b139dbc8fe8be9153f68049bfa8387dfde33f1c9 # WARNING: change to your github client secret
db:
- password: *
+ password: root # WARNING: please change password in production environment
+
diff --git a/samples/AuthenticationServer/src/main/resources/sql/user.sql b/authentication-server/src/main/resources/sql/user.sql
similarity index 100%
rename from samples/AuthenticationServer/src/main/resources/sql/user.sql
rename to authentication-server/src/main/resources/sql/user.sql
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..70cea20
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,91 @@
+<?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>
+
+ <groupId>org.apache.servicecomb.authentication</groupId>
+ <artifactId>authentication-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <modules>
+ <module>api</module>
+ <module>authentication-server</module>
+ <module>samples</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>java-chassis-dependencies</artifactId>
+ <version>1.2.0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>solution-basic</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>inspector</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <version>2.1.2.RELEASE</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ <configuration>
+ <mainClass>${main.class}</mainClass>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
\ No newline at end of file
diff --git a/samples/pom.xml b/samples/pom.xml
index 9bf4cac..c4a13e2 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -20,9 +20,13 @@
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>
- <groupId>org.apache.servicecomb.authentication</groupId>
+ <parent>
+ <groupId>org.apache.servicecomb.authentication</groupId>
+ <artifactId>authentication-parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
<artifactId>authentication-samples</artifactId>
- <version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
@@ -30,63 +34,8 @@
</properties>
<modules>
- <module>AuthenticationServer</module>
<module>ResourceServer</module>
<module>EdgeService</module>
<module>Client</module>
</modules>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.servicecomb</groupId>
- <artifactId>java-chassis-dependencies</artifactId>
- <version>1.2.0</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.servicecomb</groupId>
- <artifactId>solution-basic</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.servicecomb</groupId>
- <artifactId>inspector</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.2.RELEASE</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- <configuration>
- <mainClass>${main.class}</mainClass>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
</project>
\ No newline at end of file