GithubHelp home page GithubHelp logo

zhaoxiaowu / justauth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from justauth/justauth

0.0 1.0 0.0 6.33 MB

:100: 史上最全的整合第三方登录的开源库。目前已支持Github、Gitee、微博、钉钉、百度、Coding、腾讯云开发者平台、OSChina、支付宝、QQ、微信、淘宝、Google、Facebook、抖音、领英、小米、微软、今日头条、Teambition、StackOverflow、Pinterest、人人、华为、企业微信、酷家乐、Gitlab、美团、饿了么和推特等第三方平台的授权登录。 Login, so easy!

Home Page: https://docs.justauth.whnb.wang

License: MIT License

Java 99.25% Shell 0.75%

justauth's Introduction

Login, so easy.

star github star

查看更多

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

项目开源地址:gitee | github
项目文档:参考文档

特点

废话不多说,就俩字:

  1. :已集成十多家第三方平台(国内外常用的基本都已包含),仍然还在持续扩展中(开发计划)!
  2. :API就是奔着最简单去设计的(见后面快速开始),尽量让您用起来没有障碍感!

快速开始

  • 引入依赖
<dependency>
    <groupId>me.zhyd.oauth</groupId>
    <artifactId>JustAuth</artifactId>
    <version>1.15.3-alpha</version>
</dependency>
  • 调用api
// 创建授权request
AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
        .clientId("clientId")
        .clientSecret("clientSecret")
        .redirectUri("redirectUri")
        .build());
// 生成授权页面
authRequest.authorize("state");
// 授权登录后会返回code(auth_code(仅限支付宝))、state,1.8.0版本后,可以用AuthCallback类作为回调接口的参数
// 注:JustAuth默认保存state的时效为3分钟,3分钟内未使用则会自动清除过期的state
authRequest.login(callback);

如下任选一种 HTTP 工具 依赖,项目内如果已有,请忽略

  • hutool-http

    <dependency>
        <groupId>cn.hutool</groupId>
        <artifactId>hutool-http</artifactId>
        <version>5.2.5</version>
    </dependency>
  • httpclient

    <dependency>
    	<groupId>org.apache.httpcomponents</groupId>
      	<artifactId>httpclient</artifactId>
      	<version>4.5.12</version>
    </dependency>
  • okhttp

    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>4.4.1</version>
    </dependency>

后续开发计划

参考:[开发计划] 待扩展的第三方平台

另外,期待您和我一起完善这个项目!

贡献代码

  1. fork本项目到自己的repo
  2. 把fork过去的项目也就是你仓库中的项目clone到你的本地
  3. 修改代码
  4. commit后push到自己的库
  5. 发起PR(pull request) 请求,提交到dev分支
  6. 等待作者合并

贡献者名单

contributors

致谢

在项目立项初期,也对当前开源圈的一些相同类型的项目作过调研,同时本项目也参考过这些项目,再次感谢开源圈内的朋友。

图片引用自lets-mica

JustAuth - Login, so easy! | Product Hunt Embed

开源推荐

关注&交流

公众号 微信(备注:JustAuth)

QQ群

  • JustAuth交流群 (230017570):专业交流该项目

请喝咖啡

支付宝 微信

通过“爱发电”赞助,感谢您的支持

justauth's People

Contributors

zhangyd-c avatar xkcoding avatar pengisgood avatar skqing avatar dennisit avatar harryleexyz avatar smowton avatar wuweiqi1993 avatar erichetti avatar runningzyp avatar githubeacon avatar dengliming avatar jnan77 avatar shimingxy avatar eggsblue avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.