久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='YbuHe'><tr id='YbuHe'><dt id='YbuHe'><q id='YbuHe'><span id='YbuHe'><b id='YbuHe'><form id='YbuHe'><ins id='YbuHe'></ins><ul id='YbuHe'></ul><sub id='YbuHe'></sub></form><legend id='YbuHe'></legend><bdo id='YbuHe'><pre id='YbuHe'><center id='YbuHe'></center></pre></bdo></b><th id='YbuHe'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YbuHe'><tfoot id='YbuHe'></tfoot><dl id='YbuHe'><fieldset id='YbuHe'></fieldset></dl></div>

    • <bdo id='YbuHe'></bdo><ul id='YbuHe'></ul>

    <small id='YbuHe'></small><noframes id='YbuHe'>

    <tfoot id='YbuHe'></tfoot>
  • <legend id='YbuHe'><style id='YbuHe'><dir id='YbuHe'><q id='YbuHe'></q></dir></style></legend>

        .NET Google api 1.7 beta 使用刷新令牌進行身份驗證

        .NET Google api 1.7 beta authenticating with refresh token(.NET Google api 1.7 beta 使用刷新令牌進行身份驗證)
          1. <small id='bo9FN'></small><noframes id='bo9FN'>

              <bdo id='bo9FN'></bdo><ul id='bo9FN'></ul>
              <legend id='bo9FN'><style id='bo9FN'><dir id='bo9FN'><q id='bo9FN'></q></dir></style></legend>

              <tfoot id='bo9FN'></tfoot>

                  <i id='bo9FN'><tr id='bo9FN'><dt id='bo9FN'><q id='bo9FN'><span id='bo9FN'><b id='bo9FN'><form id='bo9FN'><ins id='bo9FN'></ins><ul id='bo9FN'></ul><sub id='bo9FN'></sub></form><legend id='bo9FN'></legend><bdo id='bo9FN'><pre id='bo9FN'><center id='bo9FN'></center></pre></bdo></b><th id='bo9FN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='bo9FN'><tfoot id='bo9FN'></tfoot><dl id='bo9FN'><fieldset id='bo9FN'></fieldset></dl></div>
                    <tbody id='bo9FN'></tbody>
                  本文介紹了.NET Google api 1.7 beta 使用刷新令牌進行身份驗證的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我一直在查看 Oauth .Net Google API,以便通過 OAuth 進行身份驗證并使用 Google drive API.

                  I've been looking at the Oauth .Net Google Apis in order to authenticate via OAuth and use the Google drive Apis.

                  具體來說,我想使用我已經存儲的刷新令牌來實例化 GoogleDrive 服務.

                  Specifically, I want to use a refresh token I already have stored in order to use it to instantiate a GoogleDrive service.

                  我找到了類似的樣本https:///code.google.com/p/google-api-dotnet-client/source/browse/Tasks.SimpleOAuth2/Program.cs?repo=samples

                  這似乎使用GoogleWebAuthorizationBroker.AuthorizeAsync",但我不確定如何使用刷新令牌而不是您在本示例中提供的客戶端機密來使用該方法.

                  That seem to use "GoogleWebAuthorizationBroker.AuthorizeAsync" but I'm not sure how I can use that method with a refresh token rather than the client secrets you seem to be feeding it in this example.

                  推薦答案

                  如果我理解正確,您是在問如何根據現有的刷新令牌創建新的 Google 服務.

                  If I understand you correctly, you are asking how can you create a new Google service, based on an existing refresh token.

                  因此,您可以執行以下操作:

                  So, you can do the following:

                  var token = new TokenResponse { RefreshToken = "YOUR_REFRESH_TOKEN_HERE" }; 
                  var credentials = new UserCredential(new GoogleAuthorizationCodeFlow(
                      new GoogleAuthorizationCodeFlow.Initializer 
                      {
                        ClientSecrets = [your_client_secrets_here]
                      }), "user", token);
                  

                  然后您可以將您的憑據傳遞給服務的初始化程序.

                  Then you can pass your credentials to the service's initializer.

                  通過執行上述操作,GoogleAuthorizationCodeFlow 將根據您刷新令牌和客戶端機密獲取新的訪問令牌.

                  By doing the above, GoogleAuthorizationCodeFlow will get a new access token based on you refresh token and client secrets.

                  請注意,您必須在此處擁有客戶端密碼,否則您將無法獲得訪問令牌.

                  Note that you must have client secrets here, without that, you won't be able to get an access token.

                  這篇關于.NET Google api 1.7 beta 使用刷新令牌進行身份驗證的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                  XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                  Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                  Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                  delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                  Parse malformed XML(解析格式錯誤的 XML)
                  <i id='ZoRhx'><tr id='ZoRhx'><dt id='ZoRhx'><q id='ZoRhx'><span id='ZoRhx'><b id='ZoRhx'><form id='ZoRhx'><ins id='ZoRhx'></ins><ul id='ZoRhx'></ul><sub id='ZoRhx'></sub></form><legend id='ZoRhx'></legend><bdo id='ZoRhx'><pre id='ZoRhx'><center id='ZoRhx'></center></pre></bdo></b><th id='ZoRhx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ZoRhx'><tfoot id='ZoRhx'></tfoot><dl id='ZoRhx'><fieldset id='ZoRhx'></fieldset></dl></div>
                • <legend id='ZoRhx'><style id='ZoRhx'><dir id='ZoRhx'><q id='ZoRhx'></q></dir></style></legend>

                    <small id='ZoRhx'></small><noframes id='ZoRhx'>

                          <bdo id='ZoRhx'></bdo><ul id='ZoRhx'></ul>
                              <tbody id='ZoRhx'></tbody>
                          • <tfoot id='ZoRhx'></tfoot>
                            主站蜘蛛池模板: 美女三区 | 亚洲国产欧美在线 | 国产免国产免费 | 欧美日本韩国一区二区三区 | 婷婷综合激情 | 色一情一乱一伦一区二区三区 | 亚洲成人精选 | 成人在线视频免费观看 | 韩日一区 | 91精品国产综合久久久久 | 97国产在线视频 | 亚洲国产精品激情在线观看 | 欧美大片一区二区 | 久久久久一区 | 91最新视频 | 天天色天天射天天干 | www.男人天堂.com | 欧美一区不卡 | 亚洲精品电影在线观看 | 日本不卡一区二区三区在线观看 | 欧美激情综合五月色丁香小说 | 欧美日韩精品一区二区三区蜜桃 | 久久久精品一区二区三区 | 国产精品高清在线 | 日本人爽p大片免费看 | 国产精品一区二区三区免费观看 | 欧美一区二区大片 | 在线观看欧美日韩视频 | 欧美精品一区二区免费 | 日本成人免费观看 | 午夜资源 | 中文福利视频 | 亚洲精品一区中文字幕 | 在线a视频网站 | 99欧美精品 | 午夜激情网 | 不卡一区二区在线观看 | 一级免费看 | 91精品国产综合久久久久久 | 99re在线播放| 日本黄色一级片视频 |