代码之家  ›  专栏  ›  技术社区  ›  DFectuoso

Janrain php库和用于OpenId的google端点

  •  0
  • DFectuoso  · 技术社区  · 16 年前

    我使用janRain Php库进行OpenId和yadis发现,无论我做什么,我都会使用user.OpenId.org或我自己的提供商,但是如果我尝试使用google端点,我无法获得任何发现信息。

    即使我为janrain库运行发现示例,也会得到下一个结果

    Identifier  http://www.google.com/accounts/o8/id
    No OpenID services discovered.
    

    如果我在url之前添加https://也会发生同样的情况。

    为什么openId如此#@!#@复杂且未记录?(注意,我给zend_openid几个小时的时间来获得相同的结果)

    4 回复  |  直到 14 年前
        1
  •  3
  •   FryGuy    15 年前

    它在这里工作。一些提示:

    • 据我所知, http(s)://www.google.com/accounts/o8/id 发现 终点。您必须为它提供一个有效的(google)OpenID标识符,如 example.blogspot.com ,它返回声明的标识符、服务器URL、服务类型等。
    • <? <?= discover.php (将其替换为 <?php <?php echo ).或者,你也可以 ini_set('short_open_tag', '1') php.ini-recommended .
    • 您的PHP安装是否支持SSL?看见 README ,具体而言,本部分:
    Not all PHP installations support SSL.  You can find out if yours
    supports SSL by reading the "HTTP Fetching" section of the output of
    "examples/detect.php."  If your installation does not support SSL,
    then https:// identity URLs and server URLs will not be supported by
    the library.  An attempt to use such an identity URL will be
    equivalent to using an invalid OpenID.  To enable SSL support,
    recompile PHP with OpenSSL support or install the appropriate OpenSSL
    module for your platform.  If you are using CURL, CURL will need to be
    built with OpenSSL support.
        2
  •  1
  •   Neil Davis    14 年前

    这是合法的牛肉。谷歌表示他们支持OpenID,但他们的工作方式与其他人不同。MyOpenID.com、blogspot、aol、yahoo、wordpress、myspace、livejournal和许多其他网站都正确地支持该标准,并且它可以按预期工作。与您自己的OpenID提供程序一样,您可以使用CommunityID服务器项目进行构建。

        3
  •  0
  •   singpolyma    16 年前

    您需要执行定向身份请求。通常这只需要传递URL,就好像用户已经输入了它一样。。。这在过去一直适用于我(只要您使用的库支持OpenID2.0)。

        4
  •  0
  •   Community CDub    7 年前

    我建议你看看这个问题: Janrain's PHP-OpenID and Google/Yahoo