来自 googlecodesamples 的以下链接有效。
注意:由于我只能有 2 个链接,我不能指向我的来源
问题stackover google-hybrid-openidoauth-login-not-prompting-for-oauth-access
和developers_google_com/accounts/docs/OpenID
https://accounts.google.com/o/openid2/auth?openid.ns=http://specs.openid.net/auth/2.0
&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select
&openid.identity=http://specs.openid.net/auth/2.0/identifier_select
&openid.return_to=http://googlecodesamples.com/hybrid/index.php
&openid.realm=http://googlecodesamples.com&openid.mode=checkid_setup
&openid.ns.ui=http://specs.openid.net/extensions/ui/1.0
&openid.ns.ext1=http://openid.net/srv/ax/1.0
&openid.ext1.mode=fetch_request
&openid.ext1.type.email=http://axschema.org/contact/email
&openid.ext1.type.first=http://axschema.org/namePerson/first
&openid.ext1.type.last=http://axschema.org/namePerson/last
&openid.ext1.required=email,first,last
&openid.ns.oauth=http://specs.openid.net/extensions/oauth/1.0
&openid.oauth.consumer=googlecodesamples.com
&openid.oauth.scope=http://www.google.com/m8/feeds/
以上链接
它会将您带到登录/确认并返回一个空白页面,但回复的 url 是正确的,如下所示:
http://googlecodesamples.com/hybrid/index.php?
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=2012-08-02T22:51:28ZNuhXnuA5P14fcg
openid.return_to=http://googlecodesamples.com/hybrid/index.php
openid.assoc_handle=AMlYA9XA_khrLenZI2mnUwkI1PWV-7ERMRXskVzs_nlFhq87rO0iowVL
openid.signed=op_endpoint,claimed_id,identity,return_to,response_nonce,
assoc_handle,ns.ext1,ns.ext2,ext1.mode,ext1.type.first,ext1.value.first,
ext1.type.email,ext1.value.email,ext1.type.last,ext1.value.last,ext2.scope,
ext2.request_token
openid.sig=JFoYU7PM4GoKBODmLyMtip5q7x4=
openid.identity=https://www.google.com/accounts/o8/id?id=AItOawlvAimmJ5_y6-gMro7Xyl75LXMC7jYCkiA
openid.claimed_id=https://www.google.com/accounts/o8/id?id=AItOawlvAimmJ5_y6-gMro7Xyl75LXMC7jYCkiA
openid.ns.ext1=http://openid.net/srv/ax/1.0
openid.ext1.mode=fetch_response
openid.ext1.type.first=http://axschema.org/namePerson/first
openid.ext1.value.first=nico
openid.ext1.type.email=http://axschema.org/contact/email
openid.ext1.value.email=nico.gtest@gmail.com
openid.ext1.type.last=http://axschema.org/namePerson/last
openid.ext1.value.last=gtest
openid.ns.ext2=http://specs.openid.net/extensions/oauth/1.0
openid.ext2.scope=http://www.google.com/m8/feeds/
openid.ext2.request_token=4/vAQqXlNILhAC0KCIBS2xlhtpo0IT.4lllxzFP7ncSgrKXntQAax2gXBbTcQI
其中重要的部分是回复中存在openid.ext2.request_token女巫
但是如果我将链接更改为我的信息,则回复没有任何 oauth 字段
https://accounts.google.com/o/openid2/auth?openid.ns=http://specs.openid.net/auth/2.0
&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select
&openid.identity=http://specs.openid.net/auth/2.0/identifier_select
&openid.return_to=http://dev.oncrm.co.za:9004/gauthapp/myserv?test_v=verify_dbug
&openid.realm=http://dev.oncrm.co.za:9004
&openid.mode=checkid_setup
&openid.ns.ui=http://specs.openid.net/extensions/ui/1.0
&openid.ns.ext1=http://openid.net/srv/ax/1.0
&openid.ext1.mode=fetch_request
&openid.ext1.type.email=http://axschema.org/contact/email
&openid.ext1.type.first=http://axschema.org/namePerson/first
&openid.ext1.type.last=http://axschema.org/namePerson/last
&openid.ext1.required=email,first,last
&openid.ns.oauth=http://specs.openid.net/extensions/oauth/1.0
&openid.oauth.consumer=dev.oncrm.co.za:9004
&openid.oauth.scope=http://www.google.com/m8/feeds/
以上链接
我已经在谷歌控制台注册了我的域名
创建了一个客户端 ID 和客户端密码,女巫没有用于任何示例的 url 中???
开启所有 API 服务
openid.realm == openid.oauth.consumer与样本相同
openID 部分工作,但无法让谷歌返回openid.ext2.request_token ,所以我可以继续请求 access_token
我还使用了 openid4java API(带有 oauth 扩展,问题 110),在 oauth 上没有成功
问题
a) 为什么我的链接不起作用,我还需要做什么
b) 如果不使用,Client ID 和 Client Secret 的概念是什么
c)参数:openid.ns.oauth=http://specs.openid.net/extensions/oauth/1.0 也困扰着我,是在 oauth1.0 或 oauth2.0 上工作的 openID+OAuth
请提供任何帮助将不胜感激
谢谢尼科