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

🔀 合并分支

上级 4f303705
......@@ -283,7 +283,22 @@ public class AuthRequestTest {
AuthRequest authRequest = new AuthHuaweiRequest(AuthConfig.builder()
.clientId("clientId")
.clientSecret("clientSecret")
.redirectUri("redirectUri")
.redirectUri("http://redirectUri")
.build());
// 返回授权页面,可自行跳转
authRequest.authorize("state");
// 授权登录后会返回code(auth_code(仅限支付宝))、state,1.8.0版本后,可以用AuthCallback类作为回调接口的入参
// 注:JustAuth默认保存state的时效为3分钟,3分钟内未使用则会自动清除过期的state
AuthResponse login = authRequest.login(new AuthCallback());
}
@Test
public void weChatEnterpriseTest() {
AuthRequest authRequest = new AuthWeChatEnterpriseRequest(AuthConfig.builder()
.clientId("clientId")
.clientSecret("clientSecret")
.redirectUri("http://redirectUri")
.agentId("agentId")
.build());
// 返回授权页面,可自行跳转
authRequest.authorize("state");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册