1
0
mirror of synced 2025-12-10 16:28:35 +08:00

Compare commits

...

7 Commits

Author SHA1 Message Date
yadong.zhang
b71b081c96 🔖 Pre-Releasing / Version tags. 2020-08-24 19:30:07 +08:00
yadong.zhang
6b00783cd9 ⬆️ Upgrading dependencies. 2020-08-18 09:30:59 +08:00
yadong.zhang
2723f0dc3d 🔖 Pre-Releasing / Version tags 1.15.7-beta.3. 2020-08-18 09:17:22 +08:00
yadong.zhang
abbfb73337 🔖 Releasing / Version tags. 2020-08-15 20:48:18 +08:00
yadong.zhang
960892eec3 Adding tests. 2020-08-15 20:44:43 +08:00
yadong.zhang
4a6216f7d9 🎨 Improve the Microsoft platform's questions about scope. 2020-08-15 20:44:24 +08:00
yadong.zhang
ce689362ac 🐛 Fixing a bug for wechat. 2020-08-15 20:43:04 +08:00
8 changed files with 33 additions and 17 deletions

View File

@@ -6,7 +6,7 @@
</p>
<p align="center">
<a target="_blank" href="https://search.maven.org/search?q=JustAuth">
<img src="https://img.shields.io/badge/Maven%20Central-1.15.7%20beta.1-blue" ></img>
<img src="https://img.shields.io/badge/Maven%20Central-1.15.7%20beta.3-blue" ></img>
</a>
<a target="_blank" href="https://gitee.com/yadong.zhang/JustAuth/blob/master/LICENSE">
<img src="https://img.shields.io/apm/l/vim-mode.svg?color=yellow" ></img>
@@ -15,7 +15,7 @@
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" ></img>
</a>
<a target="_blank" href="https://apidoc.gitee.com/yadong.zhang/JustAuth/" title="API文档">
<img src="https://img.shields.io/badge/Api%20Docs-1.15.7%20beta.1-orange" ></img>
<img src="https://img.shields.io/badge/Api%20Docs-1.15.7%20beta.3-orange" ></img>
</a>
<a target="_blank" href="https://justauth.wiki" title="参考文档">
<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
@@ -97,7 +97,7 @@ These artifacts are available from Maven Central:
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.15.7-beta.1</version>
<version>1.15.7-beta.2</version>
</dependency>
```
- Using JustAuth

View File

@@ -6,7 +6,7 @@
</p>
<p align="center">
<a target="_blank" href="https://search.maven.org/search?q=JustAuth">
<img src="https://img.shields.io/badge/Maven%20Central-1.15.7%20beta.1-blue" ></img>
<img src="https://img.shields.io/badge/Maven%20Central-1.15.7%20beta.3-blue" ></img>
</a>
<a target="_blank" href="https://gitee.com/yadong.zhang/JustAuth/blob/master/LICENSE">
<img src="https://img.shields.io/apm/l/vim-mode.svg?color=yellow" ></img>
@@ -15,7 +15,7 @@
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" ></img>
</a>
<a target="_blank" href="https://apidoc.gitee.com/yadong.zhang/JustAuth/" title="API文档">
<img src="https://img.shields.io/badge/Api%20Docs-1.15.7%20beta.1-orange" ></img>
<img src="https://img.shields.io/badge/Api%20Docs-1.15.7%20beta.3-orange" ></img>
</a>
<a target="_blank" href="https://justauth.wiki" title="参考文档">
<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
@@ -107,7 +107,7 @@ JustAuth 集成了诸如Github、Gitee、支付宝、新浪微博、微信、
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.15.7-beta.1</version>
<version>1.15.7-beta.3</version>
</dependency>
```
- 调用api

View File

@@ -1 +1 @@
1.15.7-beta.1
1.15.7-beta.3

View File

@@ -6,15 +6,12 @@
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.15.7-beta.1</version>
<version>1.15.7-beta.3</version>
<name>JustAuth</name>
<url>https://gitee.com/yadong.zhang/JustAuth</url>
<description>
史上最全的整合第三方登录开源。目前已支持Github、Gitee、微博、钉钉、百度、Coding、腾讯云开发者平台、OSChina、支付宝、
QQ、微信开放平台、微信公众平台、淘宝、Google、Facebook、抖音、领英、小米、微软、今日头条、Teambition、StackOverflow、Pinterest、人人、华为、
企业微信、酷家乐、Gitlab、美团、饿了么和推特等第三方平台的授权登录。
Login, so easy!
小而全而美的第三方登录开源组件。目前已支持Github、Gitee、微博、钉钉、百度、Coding、腾讯云开发者平台、OSChina、支付宝、QQ、微信、淘宝、Google、Facebook、抖音、领英、小米、微软、今日头条、Teambition、StackOverflow、Pinterest、人人、华为、企业微信、酷家乐、Gitlab、美团、饿了么和推特等第三方平台的授权登录。 Login, so easy!
</description>
<licenses>
@@ -63,7 +60,7 @@
<simple-http.version>1.0.2</simple-http.version>
<lombok-version>1.18.10</lombok-version>
<junit-version>4.11</junit-version>
<fastjson-version>1.2.71</fastjson-version>
<fastjson-version>1.2.73</fastjson-version>
<alipay-sdk-version>4.8.10.ALL</alipay-sdk-version>
<jacoco-version>0.8.2</jacoco-version>
</properties>

View File

@@ -30,7 +30,7 @@ public enum AuthCacheScheduler {
this.scheduler = new ScheduledThreadPoolExecutor(10, r -> new Thread(r, String.format("JustAuth-Task-%s", cacheTaskNumber.getAndIncrement())));
}
private void shutdown() {
public void shutdown() {
if (null != scheduler) {
this.scheduler.shutdown();
}

View File

@@ -143,7 +143,7 @@ public class AuthMicrosoftRequest extends AuthDefaultRequest {
.queryParam("client_id", config.getClientId())
.queryParam("client_secret", config.getClientSecret())
.queryParam("grant_type", "authorization_code")
.queryParam("scope", "offline_access user.read mail.read")
.queryParam("scope", this.getScopes(" ", true, AuthScopeUtils.getDefaultScopes(AuthMicrosoftScope.values())))
.queryParam("redirect_uri", config.getRedirectUri())
.build();
}
@@ -172,7 +172,7 @@ public class AuthMicrosoftRequest extends AuthDefaultRequest {
.queryParam("client_secret", config.getClientSecret())
.queryParam("refresh_token", refreshToken)
.queryParam("grant_type", "refresh_token")
.queryParam("scope", "user.read%20mail.read")
.queryParam("scope", this.getScopes(" ", true, AuthScopeUtils.getDefaultScopes(AuthMicrosoftScope.values())))
.queryParam("redirect_uri", config.getRedirectUri())
.build();
}

View File

@@ -124,8 +124,8 @@ public class AuthWeChatMpRequest extends AuthDefaultRequest {
.queryParam("appid", config.getClientId())
.queryParam("redirect_uri", GlobalAuthUtils.urlEncode(config.getRedirectUri()))
.queryParam("response_type", "code")
.queryParam("state", getRealState(state).concat("#wechat_redirect"))
.queryParam("scope", this.getScopes(",", false, AuthScopeUtils.getDefaultScopes(AuthWechatMpScope.values())))
.queryParam("state", getRealState(state).concat("#wechat_redirect"))
.build();
}

View File

@@ -0,0 +1,19 @@
package me.zhyd.oauth.request;
import me.zhyd.oauth.config.AuthConfig;
import me.zhyd.oauth.utils.AuthStateUtils;
import org.junit.Test;
public class AuthWeChatMpRequestTest {
@Test
public void authorize() {
AuthRequest request = new AuthWeChatMpRequest(AuthConfig.builder()
.clientId("a")
.clientSecret("a")
.redirectUri("https://www.justauth.cn")
.build());
System.out.println(request.authorize(AuthStateUtils.createState()));
}
}