浏览代码

调整OAuth2 结构

zhouhao 8 年之前
父节点
当前提交
2f87b3aaad
共有 19 个文件被更改,包括 491 次插入66 次删除
  1. 7 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/pom.xml
  2. 64 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/OAuth2RequestService.java
  3. 42 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/OAuth2ServerConfig.java
  4. 39 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/OAuth2SessionBuilder.java
  5. 54 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/listener/OAuth2CodeAuthBeforeEvent.java
  6. 27 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/listener/OAuth2Event.java
  7. 28 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/listener/OAuth2Listener.java
  8. 138 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/request/OAuth2Request.java
  9. 36 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/request/OAuth2Session.java
  10. 39 0
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/response/OAuth2Response.java
  11. 0 45
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/pom.xml
  12. 7 11
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/pom.xml
  13. 3 2
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-api/src/main/java/org/hswebframework/web/authorization/oauth2/api/OAuth2ServerService.java
  14. 1 1
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/AuthorizationCodeEntity.java
  15. 1 1
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/OAuth2AccessEntity.java
  16. 2 3
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/OAuth2ClientEntity.java
  17. 1 1
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/SimpleAuthorizationCodeEntity.java
  18. 1 1
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/SimpleOAuth2AccessEntity.java
  19. 1 1
      hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/SimpleOAuth2ClientEntity.java

+ 7 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/pom.xml

@@ -30,4 +30,11 @@
     <artifactId>hsweb-authorization-oauth2-client</artifactId>
 
 
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-authorization-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 </project>

+ 64 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/OAuth2RequestService.java

@@ -0,0 +1,64 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client;
+
+import org.hswebframework.web.authorization.Authentication;
+import org.hswebframework.web.authorization.oauth2.client.listener.OAuth2Event;
+import org.hswebframework.web.authorization.oauth2.client.listener.OAuth2Listener;
+import org.hswebframework.web.authorization.oauth2.client.request.OAuth2Session;
+import org.hswebframework.web.authorization.oauth2.client.response.OAuth2Response;
+
+import java.util.List;
+import java.util.function.Function;
+
+/**
+ * @author zhouhao
+ */
+public interface OAuth2RequestService {
+    OAuth2SessionBuilder create(String serverId);
+
+    void registerListener(String serverId, OAuth2Listener<? extends OAuth2Event> listener);
+
+    void doEvent(String serverId, OAuth2Event event);
+
+    void doEvent(String serverId, OAuth2Event event, Class<? extends OAuth2Event> eventType);
+
+
+    static void main(String[] args) {
+        OAuth2RequestService requestService = null;
+        Function<OAuth2Response, Authentication> authExchanger = null;
+        String authorizationCode = "";
+
+        OAuth2Session session = requestService
+                .create("hsweb-user-center")
+                .byAuthorizationCode(authorizationCode);
+
+        Authentication authentication = session
+                .request("oauth2/user-auth-info")
+                .get()
+                .as(Authentication.class);
+
+        session.request("menu")
+                .param("paging", "0")
+                .get().as(List.class);
+
+        authentication.getUser().getId();
+
+    }
+}

+ 42 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/OAuth2ServerConfig.java

@@ -0,0 +1,42 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+public interface OAuth2ServerConfig {
+    String name = "name";
+
+    String describe = "describe";
+
+    String apiBaseUrl = "apiBaseUrl";
+
+    String authUrl = "authUrl";
+
+    String accessTokenUrl = "accessTokenUrl";
+
+    String clientId = "clientId";
+
+    String clientSecret = "clientSecret";
+
+
+}

+ 39 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/OAuth2SessionBuilder.java

@@ -0,0 +1,39 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client;
+
+import org.hswebframework.web.authorization.oauth2.client.request.OAuth2Session;
+
+/**
+ * @author zhouhao
+ */
+public interface OAuth2SessionBuilder {
+    OAuth2Session byAuthorizationCode(String code);
+
+    OAuth2Session byClientCredentials();
+
+    OAuth2Session byPassword(String username, String password);
+
+    OAuth2Session byImplicit();
+
+    OAuth2Session refreshToken(String refreshToken);
+
+    OAuth2Session byAccessToken(String accessToken);
+
+}

+ 54 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/listener/OAuth2CodeAuthBeforeEvent.java

@@ -0,0 +1,54 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client.listener;
+
+
+import java.util.Optional;
+import java.util.function.Function;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+public class OAuth2CodeAuthBeforeEvent implements OAuth2Event {
+    private String                   code;
+    private String                   state;
+    private Function<String, Object> parameterGetter;
+
+    public OAuth2CodeAuthBeforeEvent(String code, String state, Function<String, Object> parameterGetter) {
+        this.code = code;
+        this.state = state;
+        this.parameterGetter = parameterGetter;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T> Optional<T> getParameter(String name) {
+        return Optional.ofNullable((T) parameterGetter.apply(name));
+    }
+
+}

+ 27 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/listener/OAuth2Event.java

@@ -0,0 +1,27 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client.listener;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+public interface OAuth2Event {
+}

+ 28 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/listener/OAuth2Listener.java

@@ -0,0 +1,28 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client.listener;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ */
+public interface OAuth2Listener<T extends OAuth2Event> {
+    void on(T event);
+}

+ 138 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/request/OAuth2Request.java

@@ -0,0 +1,138 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client.request;
+
+import org.hswebframework.web.authorization.oauth2.client.response.OAuth2Response;
+
+import java.util.function.Consumer;
+
+/**
+ * OAuth2请求接口,用于发起OAuth2请求
+ *
+ * @author zhouhao
+ */
+public interface OAuth2Request {
+    /**
+     * 设置路径参数,如url为:/user/{userId} .设置pathParam("userId","admin"),将自动解析url为 /user/admin
+     *
+     * @param name  参数名称
+     * @param value 参数值
+     * @return request自身
+     */
+    OAuth2Request pathParam(String name, Object value);
+
+    /**
+     * 设置请求参数,相当于/url?name=value
+     *
+     * @param name  参数名称
+     * @param value 参数值
+     * @return request自身
+     */
+    OAuth2Request param(String name, Object value);
+
+    /**
+     * 设置请求体,将内容根据contentType(默认application/json)序列化为对应的请求数据
+     *
+     * @param value 请求内容
+     * @return request自身
+     */
+    OAuth2Request requestBody(Object value);
+
+    /**
+     * 设置请求头
+     *
+     * @param name  名称
+     * @param value 值
+     * @return request自身
+     */
+    OAuth2Request header(String name, String value);
+
+    /**
+     * 设置cookie
+     *
+     * @param name  名称
+     * @param value 值
+     * @return request自身
+     */
+    OAuth2Request cookie(String name, String value);
+
+    /**
+     * 设置请求的contentType
+     *
+     * @param contentType
+     * @return request自身
+     * @see "application/json"
+     */
+    OAuth2Request contentType(String contentType);
+
+    /**
+     * 设置接受响应的格式,相当与请求头:Accept
+     *
+     * @param accept
+     * @return request自身
+     * @see "application/json"
+     */
+    OAuth2Request accept(String accept);
+
+    /**
+     * 设置请求超时时间,超时后回调 timeoutConsumer
+     *
+     * @param millisecond     超时时间(毫秒),小于0则不设置超时
+     * @param timeoutCallBack 超时后的处理回调
+     * @return request自身
+     * @see Consumer
+     */
+    OAuth2Request timeout(long millisecond, Consumer<OAuth2Request> timeoutCallBack);
+
+    /**
+     * 以GET方式请求,并返回请求结果
+     *
+     * @return 请求结果
+     */
+    OAuth2Response get();
+
+    /**
+     * 以PUT方式请求,并返回请求结果
+     *
+     * @return 请求结果
+     */
+    OAuth2Response put();
+
+    /**
+     * 以POST方式请求,并返回请求结果
+     *
+     * @return 请求结果
+     */
+    OAuth2Response post();
+
+    /**
+     * 以DELETE方式请求,并返回请求结果
+     *
+     * @return 请求结果
+     */
+    OAuth2Response delete();
+
+    /**
+     * 以PATCH方式请求,并返回请求结果
+     *
+     * @return 请求结果
+     */
+    OAuth2Response patch();
+
+}

+ 36 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/request/OAuth2Session.java

@@ -0,0 +1,36 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client.request;
+
+import java.io.Serializable;
+
+/**
+ * @author zhouhao
+ */
+public interface OAuth2Session extends Serializable {
+    OAuth2Session connect();
+
+    OAuth2Request request(String uriOrUrl);
+
+    OAuth2Session param(String name, Object value);
+
+    void close();
+
+    boolean isClosed();
+}

+ 39 - 0
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/src/main/java/org/hswebframework/web/authorization/oauth2/client/response/OAuth2Response.java

@@ -0,0 +1,39 @@
+/*
+ *  Copyright 2016 http://www.hswebframework.org
+ *
+ *  Licensed 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.hswebframework.web.authorization.oauth2.client.response;
+
+import java.util.List;
+import java.util.function.Function;
+
+/**
+ * @author zhouhao
+ */
+public interface OAuth2Response {
+    String asString();
+
+    byte[] asBytes();
+
+    <T> T as(Function<OAuth2Response, T> exchangeFunction);
+
+    <T> T as(Class<T> type);
+
+    <T> List<T> asList(Class<T> type);
+
+    int status();
+}

+ 0 - 45
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/pom.xml

@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~  Copyright 2016 http://www.hswebframework.org
-  ~
-  ~  Licensed 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">
-    <parent>
-        <artifactId>hsweb-authorization-oauth2-server</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-authorization-oauth2-server-entity</artifactId>
-
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-commons-entity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-authorization-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>

+ 7 - 11
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/pom.xml

@@ -28,15 +28,11 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>hsweb-authorization-oauth2-server</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-authorization-oauth2-server-entity</module>
-        <module>hsweb-authorization-oauth2-server-dao</module>
-        <module>hsweb-authorization-oauth2-server-api</module>
-        <module>hsweb-authorization-oauth2-server-simple</module>
-        <module>hsweb-authorization-oauth2-server-controller</module>
-        <module>hsweb-authorization-oauth2-server-model</module>
-        <module>hsweb-authorization-oauth2-server-starter</module>
-    </modules>
-
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-entity</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 </project>

+ 3 - 2
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-api/src/main/java/org/hswebframework/web/authorization/oauth2/api/OAuth2ServerService.java

@@ -18,8 +18,9 @@
 
 package org.hswebframework.web.authorization.oauth2.api;
 
-import org.hswebframework.web.entity.authorization.oauth2.OAuth2AccessEntity;
-import org.hswebframework.web.entity.authorization.oauth2.OAuth2ClientEntity;
+
+import org.hswebframework.web.authorization.oauth2.api.entity.OAuth2AccessEntity;
+import org.hswebframework.web.authorization.oauth2.api.entity.OAuth2ClientEntity;
 
 /**
  * @author zhouhao

+ 1 - 1
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/AuthorizationCodeEntity.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.entity.authorization.oauth2;
+package org.hswebframework.web.authorization.oauth2.api.entity;
 
 import org.hswebframework.web.commons.entity.Entity;
 

+ 1 - 1
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/OAuth2AccessEntity.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.entity.authorization.oauth2;
+package org.hswebframework.web.authorization.oauth2.api.entity;
 
 import org.hswebframework.web.commons.entity.Entity;
 

+ 2 - 3
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/OAuth2ClientEntity.java

@@ -16,9 +16,8 @@
  *
  */
 
-package org.hswebframework.web.entity.authorization.oauth2;
+package org.hswebframework.web.authorization.oauth2.api.entity;
 
-import org.hswebframework.web.authorization.User;
 import org.hswebframework.web.commons.entity.GenericEntity;
 import org.hswebframework.web.commons.entity.RecordCreationEntity;
 
@@ -49,7 +48,7 @@ public interface OAuth2ClientEntity extends GenericEntity<String>, RecordCreatio
 
     /**
      * @return 客户端所有者
-     * @see User#getId()
+     * @see org.hswebframework.web.authorization.User#getId()
      */
     String getOwnerId();
 

+ 1 - 1
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/SimpleAuthorizationCodeEntity.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.entity.authorization.oauth2;
+package org.hswebframework.web.authorization.oauth2.api.entity;
 
 
 /**

+ 1 - 1
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/SimpleOAuth2AccessEntity.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.entity.authorization.oauth2;
+package org.hswebframework.web.authorization.oauth2.api.entity;
 
 /**
  * TODO 完成注释

+ 1 - 1
hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-server/hsweb-authorization-oauth2-server-entity/src/main/java/org/hswebframework/web/entity/authorization/oauth2/SimpleOAuth2ClientEntity.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.entity.authorization.oauth2;
+package org.hswebframework.web.authorization.oauth2.api.entity;
 
 import org.hswebframework.web.commons.entity.SimpleGenericEntity;