<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ### OAuth2.0流程:參照github (1)用戶訪問客戶端,后者將前者導向認證服務器: * response\_type:表示授權類型,必選項,此處的值固定為"code" * client\_id:表示客戶端的ID,必選項 * redirect\_uri:表示重定向URI,可選項 * scope:表示申請的權限范圍,可選項 * state:表示客戶端的當前狀態,可以指定任意值,認證服務器會原封不動地返回這個值。 https://gitee.com/oauth/authorize?client_id=xxx&redirect_uri=rediurl&response_type=code https://github.com/login/oauth/authorize?client_id=xxx&scope=user:email (2)認證服務器重定向到redirect_uri,并返回參數code (3)應用服務器獲取到code,并把賬號相關信息POST請求認證服務器 * client_id:用戶ID * client_secret:用戶秘鑰 * code:接收到的code碼 (4)認證服務器返回access_token,再次用得到的token請求 * github:access_token=021118b849fb88a68c805fd9c22699c4017xxx&scope=user%3Aemail&token_type=bearer (5)得到最終需要的數據: ``` { "login":"linzening", "id":29197457, "node_id":"MDQ6VXNlcjI5MTk3NDU3", "avatar_url":"https://avatars2.githubusercontent.com/u/29197457?v=4", "gravatar_id":"", "url":"https://api.github.com/users/linzening", "html_url":"https://github.com/linzening", "followers_url":"https://api.github.com/users/linzening/followers", "following_url":"https://api.github.com/users/linzening/following{/other_user}", "gists_url":"https://api.github.com/users/linzening/gists{/gist_id}", "starred_url":"https://api.github.com/users/linzening/starred{/owner}{/repo}", "subscriptions_url":"https://api.github.com/users/linzening/subscriptions", "organizations_url":"https://api.github.com/users/linzening/orgs", "repos_url":"https://api.github.com/users/linzening/repos", "events_url":"https://api.github.com/users/linzening/events{/privacy}", "received_events_url":"https://api.github.com/users/linzening/received_events", "type":"User", "site_admin":false, "name":"linzening", "company":null, "blog":"", "location":null, "email":null, "hireable":null, "bio":null, "public_repos":15, "public_gists":0, "followers":0, "following":1, "created_at":"2017-06-05T10:19:49Z", "updated_at":"2019-02-28T11:26:10Z" } ``` >[info] 參考文檔:`http://www.ruanyifeng.com/blog/2014/05/oauth_2_0.html`
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看