【问题标题】:How to use Google OAuth as autentification for Symfony2 Rest API如何使用 Google OAuth 是 Symfony2 Rest API 的身份验证
【发布时间】:2021-11-11 15:20:46
【问题描述】:

我正在开发通过 rest api 使用我的服务器应用程序的 SPA 和 HTML5 移动应用程序。服务器应用程序连接到 Google Adwords Api,然后将数据发送到客户端应用程序。我的问题是:是否可以使用 google oauth login 作为我的服务器 api 的登录名。怎么做?

我需要使用 FOSOAuthServerBundle 吗?

最好, 安东尼奥

【问题讨论】:

    标签: api rest symfony oauth


    【解决方案1】:

    这是此用例的流程:https://developers.google.com/identity/sign-in/web/server-side-flow

    在此之后,您可以使用 google 令牌作为您的 api 令牌,或者构建您自己的 oauth 并使用您自己的令牌。

    还可以将 FOSOAuthServerBundle 与自定义授权一起使用

    【讨论】:

      猜你喜欢
      • 2018-05-02
      • 1970-01-01
      • 2012-11-27
      • 2014-10-12
      • 2016-09-07
      • 2021-09-29
      • 1970-01-01
      • 1970-01-01
      • 2014-10-29
      相关资源
      最近更新 更多