概述介紹
最全的整合第三方登錄的開源庫。目前已支持Github、Gitee、微博、釘釘、百度、Coding、騰訊雲開發者平臺、OSChina、支付寶、QQ、微信、淘寶、Google、Facebook、抖音、領英、小米、微軟、今日頭條、Teambition、StackOverflow、Pinterest、人人、華爲和企業微信等第三方平臺的授權登錄。
總結
使用
1、引入依賴
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.10.1</version>
</dependency>
2、調用API
// 創建授權request
AuthRequest authRequest =
new AuthGiteeRequest(AuthConfig.builder()
.clientId("clientId").clientSecret("clientSecret")
.redirectUri("redirectUri")
.build());
// 生成授權頁面
authRequest.authorize();
authRequest.login(callback);
3、demo
@RunWith(SpringRunner.class)
@SpringBootTest
public class JustauthDemoApplicationTests {
@Test
public void contextLoads() {
}
}
4、代碼段下載
https://gitee.com/yadong.zhang/JustAuth.git
掃碼關注
(公衆號)
(微信)
免責聲明
【寫作說明】以上內容分享給喜歡編程,有夢想的程序員,希望能幫助到你們。以上文章屬於此公衆號原創所有,如需轉載請註明出處。
【免責申明】本公衆平臺不是廣告商,也沒有爲其他三方網站或者個人做廣告宣傳。此分享的源代碼和文章是小編在項目中、學習中整理的一些認爲不錯的項目。用戶產生的一些自願下載或者付費行爲。與平臺沒有直接關係
【投稿郵箱】[email protected]
歡迎投稿分享你的優質源碼或文章