1
0
mirror of synced 2026-02-21 03:47:47 +08:00

新增支持Google登录

This commit is contained in:
Yangkai.Shen
2019-05-21 15:09:16 +08:00
parent 2dba2baef7
commit d24733e016
8 changed files with 174 additions and 0 deletions

View File

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