mirror of
https://gitee.com/yadong.zhang/JustAuth.git
synced 2025-12-06 08:48:27 +08:00
Login, so easy.
JustAuth, as you see, It is just a Java library of third-party authorized login, It's smaller and easier to use. JustAuth is the best third-party login tool written in JAVA.
Source Code:gitee | github
Docs:Reference Doc
Features
- Multiple platform: Has integrated more than a dozen third-party platforms.(plan)
- Minimalist: The minimalist design is very simple to use.
Quick start
- Add maven dependency
These artifacts are available from Maven Central:
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.13.2</version>
</dependency>
- Using JustAuth
// Create authorization request
AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
.clientId("clientId")
.clientSecret("clientSecret")
.redirectUri("redirectUri")
.build());
// Generate authorization url
authRequest.authorize("state");
// After authorization to login, it will return: code(auth_code(Alipay only)),state, After version 1.8.0, you can use the AuthCallback as a parameter to the callback interface
// Note: JustAuth saves state for 3 minutes by default. If it is not used within 3 minutes, the expired state will be cleared automatically.
authRequest.login(callback);
Examples:
- Springboot Example
- jFinal Example: by xkcoding
- ActFramework Example: by xkcoding
- Nutzboot Example: by 蛋蛋
- Blade Example
Springboot Starter
- justauth-spring-boot-starter: Spring Boot integrates best practices with JustAuth by xkcoding
- justauth-spring-boot-starter-demo: Justauth-spring-boot-starter demo project by xkcoding
API
Contributions
- Fork this project to your repository
- Clone the project after fork.
- Modify the code (either to fix issue, or to add new features)
- Commit and push code to a remote repository
- Create a new PR (pull request), and select
devbranch - Waiting for author to merge
I look forward to your joining us.
Contributors
Recommend
spring-boot-demoIn-depth study and actual combat of spring boot projects: https://github.com/xkcoding/spring-boot-demomicaEfficient Development of scaffolding by Spring Cloud: https://github.com/lets-mica/micapigCosmic strongest Micro Services Certified authorized scaffolding (essential for Architects): https://gitee.com/log4j/pigSpringBladeComplete online solution (necessary for enterprise development): https://gitee.com/smallc/SpringBlade
References
Languages
Java
99.6%
Shell
0.4%
