1
0
mirror of synced 2026-02-22 20:47:47 +08:00

增加小米登录支持

This commit is contained in:
Yangkai.Shen
2019-05-28 19:26:10 +08:00
parent 4d92794b1a
commit a6ed65ce3d
8 changed files with 232 additions and 3 deletions

View File

@@ -180,4 +180,17 @@ public class AuthRequestTest {
// 授权登录后会返回一个code用这个code进行登录
AuthResponse login = authRequest.login("code");
}
@Test
public void miTest() {
AuthRequest authRequest = new AuthMiRequest(AuthConfig.builder()
.clientId("clientId")
.clientSecret("clientSecret")
.redirectUri("redirectUri")
.build());
// 返回授权页面,可自行调整
String url = authRequest.authorize();
// 授权登录后会返回一个code用这个code进行登录
AuthResponse login = authRequest.login("code");
}
}