Authentication 如何签署google联合登录?

Authentication 如何签署google联合登录?,authentication,signature,federated-identity,Authentication,Signature,Federated Identity,好吧,我在谷歌的联邦登录中有更多的运气,我已经到了你从谷歌获得以下参数的时候了 [openid_ns] => http://specs.openid.net/auth/2.0 [openid_mode] => id_res [openid_op_endpoint] => https://www.google.com/accounts/o8/ud [openid_response_nonce] => 2010-01-02T14:58:22ZvP-t8tJXqGWaPw [o

好吧,我在谷歌的联邦登录中有更多的运气,我已经到了你从谷歌获得以下参数的时候了

[openid_ns] => http://specs.openid.net/auth/2.0
[openid_mode] => id_res
[openid_op_endpoint] => https://www.google.com/accounts/o8/ud
[openid_response_nonce] => 2010-01-02T14:58:22ZvP-t8tJXqGWaPw
[openid_return_to] => http://localhost/blablabla/index.php?c=google
[openid_assoc_handle] => AOQobUdTUUFVqQ9PeC9r19-rHOlEg_xvFmiIUahkmhNQ7Blrh14w2-eb
[openid_signed] => op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle,ns.ext1,ext1.mode,ext1.type.firstname,ext1.value.firstname,ext1.type.email,ext1.value.email,ext1.type.lastname,ext1.value.lastname
[openid_sig] => tUZtUtVcvOfrodpPEx4bItcxVME=
[openid_identity] => https://www.google.com/accounts/o8/id?id=xxxxxxxxxxxxxxxxxx
[openid_claimed_id] => https://www.google.com/accounts/o8/id?id=xxxxxxxxxxxxxxxxxx
[openid_ns_ext1] => http://openid.net/srv/ax/1.0
[openid_ext1_mode] => fetch_response
[openid_ext1_type_firstname] => http://axschema.org/namePerson/first
[openid_ext1_value_firstname] => myName
[openid_ext1_type_email] => http://axschema.org/contact/email
[openid_ext1_value_email] => user@gmail.com
[openid_ext1_type_lastname] => http://axschema.org/namePerson/last
[openid_ext1_value_lastname] => MySurname
我现在需要做的唯一一件事就是在上面签名并且“如果我理解正确的话,谷歌会用[openid\u signed]给我一个线索。”

ie:将这些参数串在一起,然后从串接的字符串中创建散列,该散列应等于[openid_sig]=>tuztutvcvvofrodppex4bitcxvme=


但是我相信签名生成公式还有更多的内容——有人知道它是什么,因为我在谷歌的文档中找不到它吗

您现在也可以使用JanRain的RPX进行同样的操作。它有一个更简单的方法,允许几乎所有的OpenID提供者

Google联合登录是OpenID,只做了一些小改动。与其在Google Federated Login的签名协议上查找文档,不如查找关于什么和的信息


即使您不想使用JanRain代码,您仍然可以通过查看代码获得这些问题的一些答案。例如,
/Auth/OpenID/Server.php
第1320行的
验证
函数似乎是验证签名的代码开始的地方。

谢谢-但是janRain不适合我的项目范围。(基本上我不喜欢它)这就是为什么我要写我自己的,目前它的代码不到100行,这对项目和我来说都要好得多。