mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-13 04:01:40 +08:00
第三方登录添加飞书
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<button type="button" onclick="thirdPartyLogin('gitee')">Gitee</button>
|
||||
<button type="button" onclick="thirdPartyLogin('OSCHINA')">OSCHINA</button>
|
||||
<button type="button" onclick="thirdPartyLogin('feishu')">飞书</button>
|
||||
<button type="button" onclick="thirdPartyLogin('qq')">QQ</button>
|
||||
<script>
|
||||
// 第三方授权登录逻辑
|
||||
|
@@ -24,6 +24,14 @@ public class ThirdPartyConfig {
|
||||
@Value("${thirdparty.oschina.redirecturi}")
|
||||
private String oschinaRedirecturi;
|
||||
|
||||
// 飞书
|
||||
@Value("${thirdparty.feishu.clientid}")
|
||||
private String feishuClientId;
|
||||
@Value("${thirdparty.feishu.clientsecret}")
|
||||
private String feishuClientsecret;
|
||||
@Value("${thirdparty.feishu.redirecturi}")
|
||||
private String feishuRedirecturi;
|
||||
|
||||
// QQ
|
||||
@Value("${thirdparty.qq.clientid}")
|
||||
private String qqClientid;
|
||||
|
@@ -6,9 +6,7 @@ import me.zhyd.oauth.config.AuthConfig;
|
||||
import me.zhyd.oauth.exception.AuthException;
|
||||
import me.zhyd.oauth.model.AuthCallback;
|
||||
import me.zhyd.oauth.model.AuthResponse;
|
||||
import me.zhyd.oauth.request.AuthGiteeRequest;
|
||||
import me.zhyd.oauth.request.AuthOschinaRequest;
|
||||
import me.zhyd.oauth.request.AuthRequest;
|
||||
import me.zhyd.oauth.request.*;
|
||||
import me.zhyd.oauth.utils.AuthStateUtils;
|
||||
import org.apache.tomcat.jni.User;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -100,6 +98,12 @@ public class ThirdPartyController extends BaseController {
|
||||
.clientSecret(thirdPartyConfig.getOschinaClientsecret())
|
||||
.redirectUri(thirdPartyConfig.getOschinaRedirecturi())
|
||||
.build());
|
||||
case "feishu":
|
||||
return new AuthFeishuRequest(AuthConfig.builder()
|
||||
.clientId(thirdPartyConfig.getFeishuClientId())
|
||||
.clientSecret(thirdPartyConfig.getFeishuClientsecret())
|
||||
.redirectUri(thirdPartyConfig.getFeishuRedirecturi())
|
||||
.build());
|
||||
case "qq":
|
||||
return new AuthGiteeRequest(AuthConfig.builder()
|
||||
.clientId(thirdPartyConfig.getQqClientid())
|
||||
|
Reference in New Issue
Block a user