@@ -91,7 +92,7 @@ These artifacts are available from Maven Central:
...
@@ -91,7 +92,7 @@ These artifacts are available from Maven Central:
<dependency>
<dependency>
<groupId>me.zhyd.oauth</groupId>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<artifactId>JustAuth</artifactId>
<version>1.10.1</version>
<version>1.11.0</version>
</dependency>
</dependency>
```
```
- Using JustAuth
- Using JustAuth
...
@@ -103,7 +104,7 @@ AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
...
@@ -103,7 +104,7 @@ AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
.redirectUri("redirectUri")
.redirectUri("redirectUri")
.build());
.build());
// Generate authorization url
// Generate authorization url
authRequest.authorize();
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
// 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.
// Note: JustAuth saves state for 3 minutes by default. If it is not used within 3 minutes, the expired state will be cleared automatically.