1
0
mirror of synced 2026-05-22 21:53:18 +00:00

👽 更新api调用方式、更新文档

This commit is contained in:
yadong.zhang
2019-02-18 13:35:12 +08:00
parent da0d8300c0
commit 1767b53bc7
12 changed files with 139 additions and 103 deletions
@@ -21,10 +21,14 @@ import java.io.IOException;
* @date 2019/1/31 16:31
* @since 1.8
*/
public class AuthGithubRequest implements AuthRequest {
public class AuthGithubRequest extends BaseAuthRequest implements AuthRequest {
public AuthGithubRequest(AuthConfig config) {
super(config);
}
@Override
public void authorize(AuthConfig config, HttpServletResponse response) {
public void authorize(HttpServletResponse response) {
if (!AuthConfigChecker.isSupportedGithub()) {
throw new AuthException(ResponseStatus.UNSUPPORTED);
}
@@ -37,7 +41,7 @@ public class AuthGithubRequest implements AuthRequest {
}
@Override
public String authorize(AuthConfig config) {
public String authorize() {
if (!AuthConfigChecker.isSupportedGithub()) {
throw new AuthException(ResponseStatus.UNSUPPORTED);
}
@@ -45,7 +49,7 @@ public class AuthGithubRequest implements AuthRequest {
}
@Override
public AuthResponse login(AuthConfig config, String code) {
public AuthResponse login(String code) {
if (!AuthConfigChecker.isSupportedGithub()) {
return AuthResponse.builder()
.code(ResponseStatus.UNSUPPORTED.getCode())