提交 7f0f1e17 编写于 作者: 智布道's avatar 智布道 👁

👽 等待simple-http发版, 解决使用apache-httpclient时的403bug

上级 65b2db32
......@@ -6,7 +6,7 @@
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.15.0-alpha</version>
<version>1.15.0</version>
<name>JustAuth</name>
<url>https://gitee.com/yadong.zhang/JustAuth</url>
......@@ -60,7 +60,7 @@
<maven-surefire-version>2.20</maven-surefire-version>
<maven-gpg-version>1.6</maven-gpg-version>
<maven.test.skip>false</maven.test.skip>
<simple-http.version>1.0</simple-http.version>
<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.62</fastjson-version>
......
......@@ -755,7 +755,7 @@ public enum AuthDefaultSource implements AuthSource {
/**
* 京东
*
* @since 1.15.0-alpha
* @since 1.15.0
*/
JD {
@Override
......
......@@ -22,10 +22,9 @@ import java.util.Map;
/**
* 京东登录
* link: http://open.jd.com/home/home#/doc/common?listId=717
*
* @author harry.lee (harryleexyz@qq.com)
* @since
* @since 1.15.0
*/
public class AuthJdRequest extends AuthDefaultRequest {
......@@ -59,15 +58,6 @@ public class AuthJdRequest extends AuthDefaultRequest {
.build();
}
/**
* link: http://jos.jd.com/api/showTools.htm?id=3051&groupId=106
* postUrl: https://api.jd.com/routerjson?v=2.0&method=jingdong.user.getUserInfoByOpenId
* &app_key=x&access_token=x&360buy_param_json={"openId":"x"}
* &timestamp=2019-09-11 11:12:26&sign=DB5278CD12443BEA22C5E5EA05A30D2B
*
* @param authToken token信息
* @return AuthUser
*/
@Override
protected AuthUser getUserInfo(AuthToken authToken) {
UrlBuilder urlBuilder = UrlBuilder.fromBaseUrl(source.userInfo())
......@@ -99,7 +89,6 @@ public class AuthJdRequest extends AuthDefaultRequest {
/**
* 个人用户无法申请应用
* 暂时只能参考官网给出的返回结果解析
* link: https://open.jd.com/home/home#/doc/api?apiCateId=106&apiId=3051&apiName=jingdong.user.getUserInfoByOpenId
*
* @param object 请求返回结果
* @return data JSONObject
......
......@@ -284,7 +284,7 @@ public class GlobalAuthUtils {
* @param appSecret 京东应用密钥
* @param params 签名参数
* @return 签名后的字符串
* @since 1.15.0-alpha
* @since 1.15.0
*/
public static String generateJdSignature(String appSecret, Map<String, Object> params) {
Map<String, Object> treeMap = new TreeMap<>(params);
......
......@@ -40,7 +40,7 @@ public class UrlBuilder {
* 只读的参数Map
*
* @return unmodifiable Map
* @since 1.15.0-alpha
* @since 1.15.0
*/
public Map<String, Object> getReadOnlyParams() {
return Collections.unmodifiableMap(params);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册