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

增加微软登录支持

This commit is contained in:
Yangkai.Shen
2019-05-28 15:58:41 +08:00
parent ae9edffc70
commit 4d92794b1a
9 changed files with 235 additions and 8 deletions

View File

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