1
0
mirror of synced 2026-02-24 22:17:50 +08:00
Files
JustAuth/README.md
2019-02-19 14:49:59 +08:00

5.3 KiB
Raw Blame History

Login, so easy.

Gitee Github Weibo CSDN 钉钉 QQ 微信
-------------------------------------------------------------------------------

JustAuth如你所见它仅仅是一个第三方授权登录工具类库它可以让我们脱离繁琐的第三方登录SDK让登录变得So easy!

快速开始

  • 引入依赖
<dependency>
    <groupId>me.zhyd.oauth</groupId>
    <artifactId>JustAuth</artifactId>
    <version>1.0.0</version>
</dependency>
  • 调用api
AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
        .clientId("clientId")
        .clientSecret("clientSecret")
        .redirectUri("redirectUri")
        .build());
// 自动跳转到授权页面
authRequest.authorize(response);
// 返回授权页面,可自行跳转
authRequest.authorize();
// 授权登录后会返回一个code用这个code进行登录
authRequest.login("code");

API列表

💻 平台 API类 📄 SDK
AuthGiteeRequest https://github.com/settings/developers
AuthGithubRequest https://gitee.com/api/v5/oauth_doc#list_1
AuthWeiboRequest https://open.weibo.com/apps
AuthCsdnRequest https://connect.qq.com/
AuthDingTalkRequest https://open-doc.dingtalk.com/microapp/serverapi2/kymkv6
AuthQqRequest 待续
AuthWechatRequest 待续