【问题标题】:Using a Google Service Account to access a GoogleAuth-protected site使用 Google 服务帐户访问受 GoogleAuth 保护的网站
【发布时间】:2017-08-17 02:02:19
【问题描述】:

我有一个在 nginx 级别受 google-oauth (3-legged OAuth) 保护的应用程序(使用 https://github.com/cloudflare/nginx-google-oauth)。您可能知道,它要求用户使用浏览器登录或手动登录谷歌帐户。

我想通过 CLI/以编程方式访问同一个受保护的应用程序。确实,nginx-google-oauth 提供了一些方法可以轻松地做到这一点:_token_curl 端点打印出准备与curl 一起使用的标头。但问题是该令牌有一个到期日期,要获得它,我需要登录或手动登录到我的谷歌帐户。

我想知道是否可以使用 Google 服务帐户 (2-legged OAuth) 访问受 google-oauth 保护的应用程序?我在文档 (https://developers.google.com/identity/protocols/OAuth2ServiceAccount) 中进行了搜索,据我了解,它仅用于访问 Google API。

有人能解释一下这个主题吗?谢谢!

【问题讨论】:

    标签: nginx google-oauth


    【解决方案1】:

    对于其他发现此问题的人,该问题已在 GitHub 上得到回答,并且 nginx-google-oauth 不支持:

    https://github.com/cloudflare/nginx-google-oauth/issues/21

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-02-01
      • 2018-10-06
      • 2013-08-30
      • 1970-01-01
      • 2017-06-26
      • 2017-11-30
      • 2020-05-13
      相关资源
      最近更新 更多