From bffc5b7e0020142292489ae5166e86b5139b53ac Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 22 Aug 2019 19:25:53 +0800 Subject: [PATCH] 2.0 --- README.md | 7 ++++--- pom.xml | 1 + {sop-example/sop-auth => sop-auth}/.gitignore | 0 {sop-example/sop-auth => sop-auth}/pom.xml | 0 {sop-example/sop-auth => sop-auth}/readme.md | 0 .../java/com/gitee/sop/sopauth/SopAuthApplication.java | 0 .../main/java/com/gitee/sop/sopauth/auth/AccessToken.java | 0 .../main/java/com/gitee/sop/sopauth/auth/AppIdManager.java | 0 .../java/com/gitee/sop/sopauth/auth/FetchTokenParam.java | 0 .../java/com/gitee/sop/sopauth/auth/FetchTokenResult.java | 0 .../main/java/com/gitee/sop/sopauth/auth/OAuth2Config.java | 0 .../java/com/gitee/sop/sopauth/auth/OAuth2Manager.java | 0 .../java/com/gitee/sop/sopauth/auth/OAuth2Service.java | 0 .../src/main/java/com/gitee/sop/sopauth/auth/OpenUser.java | 0 .../main/java/com/gitee/sop/sopauth/auth/RefreshToken.java | 0 .../main/java/com/gitee/sop/sopauth/auth/TokenPair.java | 0 .../sop/sopauth/auth/exception/LoginErrorException.java | 0 .../com/gitee/sop/sopauth/auth/impl/AppIdManagerImpl.java | 0 .../gitee/sop/sopauth/auth/impl/OAuth2ManagerCache.java | 0 .../gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java | 0 .../com/gitee/sop/sopauth/auth/impl/OAuth2ServiceImpl.java | 0 .../com/gitee/sop/sopauth/config/OpenServiceConfig.java | 0 .../gitee/sop/sopauth/controller/CallbackController.java | 0 .../com/gitee/sop/sopauth/controller/OAuth2Controller.java | 0 .../main/java/com/gitee/sop/sopauth/entity/IsvInfo.java | 0 .../main/java/com/gitee/sop/sopauth/entity/UserInfo.java | 0 .../java/com/gitee/sop/sopauth/mapper/IsvInfoMapper.java | 0 .../java/com/gitee/sop/sopauth/mapper/UserInfoMapper.java | 0 .../src/main/resources/application-dev.yml | 0 .../src/main/resources/application.yml | 0 .../src/main/resources/templates/oauth2login.html | 0 .../test/java/com/gitee/sop/sopauth/RefreshTokenTest.java | 0 .../com/gitee/sop/sopauth/SopAuthApplicationTests.java | 0 sop-example/pom.xml | 1 - 34 files changed, 5 insertions(+), 4 deletions(-) rename {sop-example/sop-auth => sop-auth}/.gitignore (100%) rename {sop-example/sop-auth => sop-auth}/pom.xml (100%) rename {sop-example/sop-auth => sop-auth}/readme.md (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/SopAuthApplication.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/AccessToken.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/AppIdManager.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenParam.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenResult.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Config.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Manager.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Service.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/OpenUser.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/RefreshToken.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/TokenPair.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/exception/LoginErrorException.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/impl/AppIdManagerImpl.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerCache.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ServiceImpl.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/config/OpenServiceConfig.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/controller/CallbackController.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/entity/IsvInfo.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/entity/UserInfo.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/mapper/IsvInfoMapper.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/java/com/gitee/sop/sopauth/mapper/UserInfoMapper.java (100%) rename {sop-example/sop-auth => sop-auth}/src/main/resources/application-dev.yml (100%) rename {sop-example/sop-auth => sop-auth}/src/main/resources/application.yml (100%) rename {sop-example/sop-auth => sop-auth}/src/main/resources/templates/oauth2login.html (100%) rename {sop-example/sop-auth => sop-auth}/src/test/java/com/gitee/sop/sopauth/RefreshTokenTest.java (100%) rename {sop-example/sop-auth => sop-auth}/src/test/java/com/gitee/sop/sopauth/SopAuthApplicationTests.java (100%) diff --git a/README.md b/README.md index 9bcc0a0f..8decfc1f 100644 --- a/README.md +++ b/README.md @@ -66,13 +66,14 @@ SOP封装了开放平台大部分功能包括:签名验证、统一异常处 > 运行环境:JDK8,Maven3,[Nacos](https://nacos.io/zh-cn/docs/what-is-nacos.html) - doc:开发文档 -- sop-admin:后台管理 -- sop-gateway:网关,统一访问入口,Spring Cloud Zuul实现,可切换成Spring Cloud Gateway - sop-common:公共模块,封装常用功能,包含签名校验、错误处理、限流等功能 +- sop-gateway:网关,统一访问入口,Spring Cloud Zuul实现,可切换成Spring Cloud Gateway - sop-example:微服务示例,含springboot,springmvc示例 +- sop-website:开放平台对应网站,提供文档API、沙箱测试等内容 +- sop-auth:应用授权服务 +- sop-admin:后台管理 - sop-sdk:基础sdk,含Java、C#版本 - sop-test:接口调用测试用例 -- sop-website:开放平台对应网站,提供文档API、沙箱测试等内容 ## 分支说明 diff --git a/pom.xml b/pom.xml index 8d8f33ef..ca648159 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,7 @@ doc sop-common + sop-auth sop-example sop-admin sop-gateway diff --git a/sop-example/sop-auth/.gitignore b/sop-auth/.gitignore similarity index 100% rename from sop-example/sop-auth/.gitignore rename to sop-auth/.gitignore diff --git a/sop-example/sop-auth/pom.xml b/sop-auth/pom.xml similarity index 100% rename from sop-example/sop-auth/pom.xml rename to sop-auth/pom.xml diff --git a/sop-example/sop-auth/readme.md b/sop-auth/readme.md similarity index 100% rename from sop-example/sop-auth/readme.md rename to sop-auth/readme.md diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/SopAuthApplication.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/SopAuthApplication.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/SopAuthApplication.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/SopAuthApplication.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/AccessToken.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/AccessToken.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/AccessToken.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/AccessToken.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/AppIdManager.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/AppIdManager.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/AppIdManager.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/AppIdManager.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenParam.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenParam.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenParam.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenParam.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenResult.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenResult.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenResult.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/FetchTokenResult.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Config.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Config.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Config.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Config.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Manager.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Manager.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Manager.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Manager.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Service.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Service.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Service.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OAuth2Service.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OpenUser.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OpenUser.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OpenUser.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/OpenUser.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/RefreshToken.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/RefreshToken.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/RefreshToken.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/RefreshToken.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/TokenPair.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/TokenPair.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/TokenPair.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/TokenPair.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/exception/LoginErrorException.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/exception/LoginErrorException.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/exception/LoginErrorException.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/exception/LoginErrorException.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/AppIdManagerImpl.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/AppIdManagerImpl.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/AppIdManagerImpl.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/AppIdManagerImpl.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerCache.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerCache.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerCache.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerCache.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ServiceImpl.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ServiceImpl.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ServiceImpl.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ServiceImpl.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/config/OpenServiceConfig.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/config/OpenServiceConfig.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/config/OpenServiceConfig.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/config/OpenServiceConfig.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/CallbackController.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/CallbackController.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/CallbackController.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/controller/CallbackController.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/entity/IsvInfo.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/entity/IsvInfo.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/entity/IsvInfo.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/entity/IsvInfo.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/entity/UserInfo.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/entity/UserInfo.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/entity/UserInfo.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/entity/UserInfo.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/mapper/IsvInfoMapper.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/mapper/IsvInfoMapper.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/mapper/IsvInfoMapper.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/mapper/IsvInfoMapper.java diff --git a/sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/mapper/UserInfoMapper.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/mapper/UserInfoMapper.java similarity index 100% rename from sop-example/sop-auth/src/main/java/com/gitee/sop/sopauth/mapper/UserInfoMapper.java rename to sop-auth/src/main/java/com/gitee/sop/sopauth/mapper/UserInfoMapper.java diff --git a/sop-example/sop-auth/src/main/resources/application-dev.yml b/sop-auth/src/main/resources/application-dev.yml similarity index 100% rename from sop-example/sop-auth/src/main/resources/application-dev.yml rename to sop-auth/src/main/resources/application-dev.yml diff --git a/sop-example/sop-auth/src/main/resources/application.yml b/sop-auth/src/main/resources/application.yml similarity index 100% rename from sop-example/sop-auth/src/main/resources/application.yml rename to sop-auth/src/main/resources/application.yml diff --git a/sop-example/sop-auth/src/main/resources/templates/oauth2login.html b/sop-auth/src/main/resources/templates/oauth2login.html similarity index 100% rename from sop-example/sop-auth/src/main/resources/templates/oauth2login.html rename to sop-auth/src/main/resources/templates/oauth2login.html diff --git a/sop-example/sop-auth/src/test/java/com/gitee/sop/sopauth/RefreshTokenTest.java b/sop-auth/src/test/java/com/gitee/sop/sopauth/RefreshTokenTest.java similarity index 100% rename from sop-example/sop-auth/src/test/java/com/gitee/sop/sopauth/RefreshTokenTest.java rename to sop-auth/src/test/java/com/gitee/sop/sopauth/RefreshTokenTest.java diff --git a/sop-example/sop-auth/src/test/java/com/gitee/sop/sopauth/SopAuthApplicationTests.java b/sop-auth/src/test/java/com/gitee/sop/sopauth/SopAuthApplicationTests.java similarity index 100% rename from sop-example/sop-auth/src/test/java/com/gitee/sop/sopauth/SopAuthApplicationTests.java rename to sop-auth/src/test/java/com/gitee/sop/sopauth/SopAuthApplicationTests.java diff --git a/sop-example/pom.xml b/sop-example/pom.xml index 58a69ccd..a3efa857 100644 --- a/sop-example/pom.xml +++ b/sop-example/pom.xml @@ -9,7 +9,6 @@ pom - sop-auth sop-story sop-book sop-easyopen