谷歌API / OAUTH / NativeApplicationClient / OAuth2Authenticator>登出? [英] Google API/OAUTH/NativeApplicationClient/OAuth2Authenticator > Logout?

查看:167
本文介绍了谷歌API / OAUTH / NativeApplicationClient / OAuth2Authenticator>登出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建一个连接到使用OATH在这个线程中发现的方案如下谷歌API的一个桌面应用程序:

I'm building a desktop app that connects to Googles APIs using OATH following the scheme found in this thread:

为DOTNET谷歌API第3版;使用日历API密钥

和一切工作正常。我有建立一个表格,显示了web浏览器收集AUTHCODE。

And all works fine. I have build a form that shows a WebBrowser to collect the authCode.

但我怎么实行退出?找不到这方面的任何API功能。

But how do I implement "Logout"? Can't find any API functionality for this.

推荐答案

尼尔斯,你可以做以下的事情。

Niels, you can do the following things.


  1. 转至
    这个URL(https://accounts.google.com/Logout?hl=en)

  2. 注销用户谷歌在WebBrowser控件
  3. 您可以通过调用 https://accounts.google.com撤销该用户令牌/ O /的oauth2 /撤销?令牌= {令牌}

  4. 您能进一步web浏览器调用,您可以
    通过调用系统删除cookies删除饼干等。 Diagnostics.Process.Start(RUNDLL32.EXE,InetCpl.cpl,ClearMyTracksByProcess 2)

  1. Log the user out of Google in the WebBrowser control by going to this URL (https://accounts.google.com/Logout?hl=en)
  2. You can revoke the users Token by calling https://accounts.google.com/o/oauth2/revoke?token={token}
  3. You can further remove cookies, etc from webbrowser by calling You can Delete cookies by calling System.Diagnostics.Process.Start("rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 2")

这篇关于谷歌API / OAUTH / NativeApplicationClient / OAuth2Authenticator>登出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆