diff --git a/pom.xml b/pom.xml index b56a890b5c0cb3b222abca0fbbd4bcf40a389f32..af082edb92d46ce7e7b0701ad6d2d28fabeece19 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,6 @@ 1.2.62 4.8.10.ALL 0.8.2 - 5.1.0 @@ -98,13 +97,6 @@ ${alipay-sdk-version} provided - - - cn.hutool - hutool-http - ${hutool-http-version} - test - diff --git a/src/test/java/me/zhyd/oauth/sdk/ThirdPartSdkTest.java b/src/test/java/me/zhyd/oauth/sdk/ThirdPartSdkTest.java deleted file mode 100644 index 00aa741c5fd1c40810932ab376a51ba462649da6..0000000000000000000000000000000000000000 --- a/src/test/java/me/zhyd/oauth/sdk/ThirdPartSdkTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package me.zhyd.oauth.sdk; - -import com.alibaba.fastjson.JSONObject; -import com.xkcoding.http.HttpUtil; -import org.junit.Test; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author yadong.zhang (yadong.zhang0415(a)gmail.com) - * @version 1.0 - * @since 1.10.0 - */ -public class ThirdPartSdkTest { - - @Test - public void huawei() { - String code = "CF1IwmFc6uZABI9Y795BkhXfvHidIFFw04I4Zc4KML4n+vlXxwNUcQKS4xlopjFDpEk6LzQbjwdTNxvjZ9jqnd/1m5nswhx8X7e0/dL2kyGAMVZWFgVq9ClxNN18b+Z0xtfJjkm7bDnfC3W5h4COgTCoLSjiWKSHWp5hCunp6pQRo1FHovZXm13TLNlhF9mCVtJx3kTQ"; - - Map form = new HashMap<>(5); - form.put("grant_type", "authorization_code"); - form.put("code", code); - form.put("client_id", "100994535"); - form.put("client_secret", "22aea400bef603fef26d15a79c806eb477b35de0a529758f2a3b1bda32bfb80d"); - form.put("redirect_uri", "http://127.0.0.1:8443/oauth/callback/huawei"); - - String response = HttpUtil.post("https://oauth-login.cloud.huawei.com/oauth2/v2/token", form, false); - System.out.println(response); - - // {"access_token":"accessToken","expires_in":3600,"refresh_token":"refreshToken","scope":"https:\/\/www.huawei.com\/auth\/account\/base.profile","token_type":"Bearer"} - - // - form.clear(); - form.put("nsp_ts", System.currentTimeMillis() + ""); - form.put("access_token", JSONObject.parseObject(response).getString("access_token")); - form.put("nsp_fmt", "JS"); - // form.put("nsp_cb", "_jqjsp"); - form.put("nsp_svc", "OpenUP.User.getInfo"); - String response2 = HttpUtil.post("https://api.vmall.com/rest.php", form, false); - System.out.println(response2); - // 华为性别 0是男,女是1 - // {"gender":1,"headPictureURL":"https://upfile-drcn.platform.hicloud.com/FileServer/image/b.0260086000226601572.20190415065228.iBKdTsqaNkdPXSz4N7pIRWAgeu45ec3k.1000.9A5467309F9284B267ECA33B59D3D7DA4A71BC732D3BB24EC6B880A73DEE9BAB.jpg","languageCode":"zh-CN","userID":"260086000226601572","userName":"151****2326","userState":1,"userValidStatus":1} - } -}