Encryption Google drive OAuth2:令牌响应文件的加密使用?

Encryption Google drive OAuth2:令牌响应文件的加密使用?,encryption,google-drive-api,google-oauth,bearer-token,Encryption,Google Drive Api,Google Oauth,Bearer Token,是否有可能加密使用Google drive OAuth2令牌响应文件 我的目标: 如果我的令牌文件已加密,则最终用户无法将其(在浏览器中的权限之后)用于其他目标 提前谢谢 VB.NET代码: 'prerequisites: create oauth2 client ids for gmail user and download file client_secret.json Dim GooSvc As Google.Apis.Drive.v3.DriveService Dim UserInfo

是否有可能加密使用Google drive OAuth2令牌响应文件

我的目标:
如果我的令牌文件已加密,则最终用户无法将其(在浏览器中的权限之后)用于其他目标

提前谢谢

VB.NET代码:

'prerequisites: create oauth2 client ids for gmail user and download file client_secret.json
Dim GooSvc As Google.Apis.Drive.v3.DriveService
Dim UserInfo As Google.Apis.Auth.OAuth2.UserCredential
Dim Stream1 = New System.IO.MemoryStream(New System.Text.UTF8Encoding().GetBytes("content_of_client_secret.json"))
UserInfo = Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.AuthorizeAsync(
    Google.Apis.Auth.OAuth2.GoogleClientSecrets.Load(Stream1).Secrets,
    New String() {"https://www.googleapis.com/auth/drive"},
    "user1",
    System.Threading.CancellationToken.None,
    New Google.Apis.Util.Store.FileDataStore("d:\temp", True)).Result
GooSvc = New Google.Apis.Drive.v3.DriveService(New Google.Apis.Services.BaseClientService.Initializer() With {.HttpClientInitializer = UserInfo})
在此之后,令牌文件
d:\temp\Google.api.Auth.OAuth2.Responses.TokenResponse-user1

-如果不存在,则自动创建(在浏览器中的权限之后)
-如果过期(1小时后)将自动刷新
-如果它“新鲜”(1小时内),则不会发生任何变化

令牌文件的内容示例:

{"access_token":"ya29.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","token_type":"Bearer","expires_in":3600,"refresh_token":"1/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","scope":"https://www.googleapis.com/auth/drive","Issued":"2019-06-02T13:21:54.775+02:00","IssuedUtc":"2019-06-02T11:21:54.775Z"}

请编辑问题,将其限制为特定问题,并提供足够详细的信息,以确定适当的答案。避免同时问多个不同的问题。请参阅帮助页面以澄清此问题。感谢您的帮助!我从原来的双重问题中创建了两个简单的问题(这仍然是第一个问题,第二个问题的id是:56428018),并且我还简化了代码后的细节。请编辑问题,将其限制为具有足够细节的特定问题,以确定适当的答案。避免同时问多个不同的问题。请参阅帮助页面以澄清此问题。感谢您的帮助!我从原来的双重问题中创建了两个简单的问题(这仍然是第一个问题,第二个问题的id是:56428018),并且我还简化了代码后面的细节。