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

    <small id='9wpmi'></small><noframes id='9wpmi'>

      <bdo id='9wpmi'></bdo><ul id='9wpmi'></ul>

    1. <i id='9wpmi'><tr id='9wpmi'><dt id='9wpmi'><q id='9wpmi'><span id='9wpmi'><b id='9wpmi'><form id='9wpmi'><ins id='9wpmi'></ins><ul id='9wpmi'></ul><sub id='9wpmi'></sub></form><legend id='9wpmi'></legend><bdo id='9wpmi'><pre id='9wpmi'><center id='9wpmi'></center></pre></bdo></b><th id='9wpmi'></th></span></q></dt></tr></i><div id='9wpmi'><tfoot id='9wpmi'></tfoot><dl id='9wpmi'><fieldset id='9wpmi'></fieldset></dl></div>

        服务器的 Google API 身份验证

        Google API Authentication for server(服务器的 Google API 身份验证)
        <i id='hC1B5'><tr id='hC1B5'><dt id='hC1B5'><q id='hC1B5'><span id='hC1B5'><b id='hC1B5'><form id='hC1B5'><ins id='hC1B5'></ins><ul id='hC1B5'></ul><sub id='hC1B5'></sub></form><legend id='hC1B5'></legend><bdo id='hC1B5'><pre id='hC1B5'><center id='hC1B5'></center></pre></bdo></b><th id='hC1B5'></th></span></q></dt></tr></i><div id='hC1B5'><tfoot id='hC1B5'></tfoot><dl id='hC1B5'><fieldset id='hC1B5'></fieldset></dl></div>

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

        <tfoot id='hC1B5'></tfoot>
          • <bdo id='hC1B5'></bdo><ul id='hC1B5'></ul>
                <legend id='hC1B5'><style id='hC1B5'><dir id='hC1B5'><q id='hC1B5'></q></dir></style></legend>
                    <tbody id='hC1B5'></tbody>
                  本文介绍了服务器的 Google API 身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我一直在尝试让 Google 的日历 API 在 PHP 网络中运行申请,但我很难通过身份验证.

                  I've been trying to get Google's Calendar API working in a PHP web application, but I'm having a hard time getting authenticated.

                  我想要做的是允许用户与服务器已知的单个帐户的日历进行交互.

                  What I want to do is to allow users to interact with calendars of a single account known by the server.

                  OAuth 2.0 文档 中涵盖的每种类型的场景都谈论用户同意"这涉及登录表单和个人用户登录,但我希望服务器本身直接进行身份验证并为自己获取访问令牌.

                  Each type of scenario covered in the OAuth 2.0 docs talks about "user consent" which involves a login form and the individual user logging in, but I want the server itself to authenticate directly and obtain an access token for itself.

                  是否有 OAuth 的某些部分或我可以使用的替代机制来执行此操作?

                  Is there some part of OAuth or some alternative mechanism I can use to do this?

                  推荐答案

                  为此,您必须完成用户同意的步骤,然后将其提供给您的访问令牌复制到 PHP 代码中.

                  In order to do this, you must go through the steps for user consent and then copy the access tokens it gives you into the PHP code.

                  OAuth 通常的流程是这样的:

                  The usual procedure for OAuth is like this:

                  1. 将用户发送到身份验证页面.
                  2. 用户返回 $_GET['code']
                  3. 将 $_GET['code'] 发送到 OAuth 服务器以获取令牌
                  4. 在数据库中为用户存储令牌(或会话,如果它非常短暂)

                  但是当使用这样的单个日历进行操作时,您需要修改步骤 4.相反,您将令牌转储到屏幕并将其作为变量复制到您的 PHP 文件中,而不是将其放入数据库中.然后,当您将访问令牌传递给服务器时,您只需传递已知的静态令牌,而不是来自数据库/会话的动态令牌.

                  But when doing it with a single calendar like this, you modify step 4. Instead, you dump the token to screen and copy it into your PHP file as variables, instead of putting it in the database. Then when you go to pass the access token to the server, you just pass the known, static token rather than a dynamic token from the database / session.

                  这篇关于服务器的 Google API 身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  1. <tfoot id='7hYYg'></tfoot>

                      <i id='7hYYg'><tr id='7hYYg'><dt id='7hYYg'><q id='7hYYg'><span id='7hYYg'><b id='7hYYg'><form id='7hYYg'><ins id='7hYYg'></ins><ul id='7hYYg'></ul><sub id='7hYYg'></sub></form><legend id='7hYYg'></legend><bdo id='7hYYg'><pre id='7hYYg'><center id='7hYYg'></center></pre></bdo></b><th id='7hYYg'></th></span></q></dt></tr></i><div id='7hYYg'><tfoot id='7hYYg'></tfoot><dl id='7hYYg'><fieldset id='7hYYg'></fieldset></dl></div>
                    1. <small id='7hYYg'></small><noframes id='7hYYg'>

                        <bdo id='7hYYg'></bdo><ul id='7hYYg'></ul>
                          <tbody id='7hYYg'></tbody>
                            <legend id='7hYYg'><style id='7hYYg'><dir id='7hYYg'><q id='7hYYg'></q></dir></style></legend>