1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        JustAuth v1.16.3 發(fā)布,新增 Builder 模式,告別 if...elseif 享受更加極致的體驗(yàn)!

        共 1947字,需瀏覽 4分鐘

         ·

        2021-08-19 01:48

        JustAuth v1.16.3[1] 發(fā)布,新增 Builder 構(gòu)建方式,告別 if...elseif 享受更加極致的使用體驗(yàn)!

        更新內(nèi)容

        ?發(fā)布 v1.16.3?新增?集成“企業(yè)微信的第三方應(yīng)用”平臺登錄?PR?AuthRequst 增加 Builder 構(gòu)建方式,使用起來更簡單。( gitee *27[2])?使用 Github Action 添加發(fā)布快照的 workflow。(#126[3])?新增了企業(yè)微信的第三方應(yīng)用登錄,AuthWeChatEnterpriseThirdQrcodeRequest。(#127[4])?添加快照版本對應(yīng)更詳細(xì)的文檔。(#128[5])?修改?在 Gitee PR (*27[6]) 的基礎(chǔ)上重構(gòu)代碼,增加 Builder 方式創(chuàng)建 AuthRequest?解決 Line 登錄的錯誤。#122[7]

        Builder 使用方式


        Builder 方式一

        靜態(tài)配置 AuthConfig

        AuthRequest authRequest = AuthRequestBuilder.builder()    .source("github")    .authConfig(AuthConfig.builder()        .clientId("clientId")        .clientSecret("clientSecret")        .redirectUri("redirectUri")        .build())    .build();

        Builder 方式二

        動態(tài)配置 AuthConfig

        AuthRequest authRequest = AuthRequestBuilder.builder()    .source("gitee")    .authConfig((source) -> {        // 通過 source 動態(tài)獲取 AuthConfig        // 此處可以靈活的從 sql 中取配置也可以從配置文件中取配置        return AuthConfig.builder()            .clientId("clientId")            .clientSecret("clientSecret")            .redirectUri("redirectUri")            .build();    })    .build();

        Builder 方式支持自定義的平臺

        AuthRequest authRequest = AuthRequestBuilder.builder()    // 關(guān)鍵點(diǎn):將自定義實(shí)現(xiàn)的 AuthSource 配置上    .extendSource(AuthExtendSource.values())    // source 對應(yīng) AuthExtendSource 中的枚舉 name    .source("other")    // ... 其他內(nèi)容不變,參考上面的示例    .build();

        引用鏈接

        [1] v1.16.3: https://gitee.com/yadong.zhang/JustAuth/releases/v1.16.3
        [2] gitee *27: https://gitee.com/yadong.zhang/JustAuth/pulls/27
        [3] #126: https://github.com/justauth/JustAuth/pull/126
        [4] #127: https://github.com/justauth/JustAuth/pull/127
        [5] #128: https://github.com/justauth/JustAuth/pull/128
        [6] *27: https://gitee.com/yadong.zhang/JustAuth/pulls/27
        [7] #122: https://github.com/justauth/JustAuth/issues/122


        瀏覽 61
        點(diǎn)贊
        評論
        收藏
        分享

        手機(jī)掃一掃分享

        分享
        舉報
        評論
        圖片
        表情
        推薦
        點(diǎn)贊
        評論
        收藏
        分享

        手機(jī)掃一掃分享

        分享
        舉報
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            欧美色操| 亚洲无码中文字幕在线观看 | 成人黄色av网站 国产精品久久成人 | 精品成人无码麻豆 | 东京热在线免费观看 | 抠逼国产| 中文字幕在线和永久在线的区别 | 日本无码一级无码视频 | 午夜成人在线观看 | 一级婬片A看免费 |