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

♻️ 添加 Request 的 AuthStateCache 构造器

This commit is contained in:
Yangkai.Shen
2019-08-02 14:57:13 +08:00
parent c1f9e96a92
commit 3e8c475d3f
25 changed files with 162 additions and 19 deletions
@@ -2,6 +2,7 @@ package me.zhyd.oauth.request;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSONObject;
import me.zhyd.oauth.cache.AuthStateCache;
import me.zhyd.oauth.config.AuthConfig;
import me.zhyd.oauth.config.AuthSource;
import me.zhyd.oauth.enums.AuthUserGender;
@@ -25,6 +26,10 @@ public class AuthGithubRequest extends AuthDefaultRequest {
super(config, AuthSource.GITHUB);
}
public AuthGithubRequest(AuthConfig config, AuthStateCache authStateCache) {
super(config, AuthSource.GITHUB, authStateCache);
}
@Override
protected AuthToken getAccessToken(AuthCallback authCallback) {
HttpResponse response = doPostAuthorizationCode(authCallback.getCode());