Php 混合演示不返回oauth请求令牌
我在开始创建google apps marketplace应用程序时遇到了很多麻烦 我尝试了很多演示,包括可以从google下载的php hello world示例。在任何情况下,openid部分都可以正常工作,但oauth失败了 我已经找到了混合openid/oauth请求,它没有返回oauth请求令牌。你可以在这里看到我的混合标准演示版的验证 您可以看到,我正在停止重定向并在链接中输出url以进行调试。我还将输出$\u请求对象中返回的所有内容 此应用程序链接到具有以下清单的market place应用程序:Php 混合演示不返回oauth请求令牌,php,openid,oauth,hybrid,Php,Openid,Oauth,Hybrid,我在开始创建google apps marketplace应用程序时遇到了很多麻烦 我尝试了很多演示,包括可以从google下载的php hello world示例。在任何情况下,openid部分都可以正常工作,但oauth失败了 我已经找到了混合openid/oauth请求,它没有返回oauth请求令牌。你可以在这里看到我的混合标准演示版的验证 您可以看到,我正在停止重定向并在链接中输出url以进行调试。我还将输出$\u请求对象中返回的所有内容 此应用程序链接到具有以下清单的market pl
<?xml version="1.0" encoding="UTF-8" ?>
<ApplicationManifest xmlns="http://schemas.google.com/ApplicationManifest/2009">
<!-- Metadata -->
<Name>Hello World</Name>
<Description>A simple application for demonstrating the marketplace</Description>
<Support>
<Link rel="support" href="http://www.lookmumimontheinternet.com/staging/hybrid/support.php" />
</Support>
<!-- Navigation link -->
<Extension id="navlink" type="link">
<Name>Hello World</Name>
<Url>http://www.lookmumimontheinternet.com/staging/hybrid/index.php?from=google&domain=${DOMAIN_NAME}</Url>
<Scope ref="calendarFeed"/>
</Extension>
<!-- Single Sign On with OpenID -->
<Extension id="realm" type="openIdRealm">
<Url>http://lookmumimontheinternet.com/staging/hybrid</Url>
</Extension>
<!-- Authorized Data access -->
<Scope id="calendarFeed">
<Url>https://www.google.com/calendar/feeds/</Url>
<Reason>This app displays your next upcoming calendar appointment..</Reason>
</Scope>
</ApplicationManifest>
运行演示时,您可以看到,即使请求oauth令牌,也没有返回任何oauth令牌(据我所知,这是正确的)。有人能看出我做错了什么吗?好的,解决了。因为应用程序在安装时是预先批准的,所以您不需要获得oauth访问权限。您的应用程序密钥已经存在此问题。确定解决了此问题。因为应用程序在安装时是预先批准的,所以您不需要获得oauth访问权限。你的应用程序密钥已经有了它
$CONSUMER_KEY = '995079586589.apps.googleusercontent.com';
$CONSUMER_SECRET = '6yTp+2Xz7nSqB4Yx6OdSds7n';
$openid_params = array(
'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://lookmumimontheinternet.com/staging/hybrid/index.php",
'openid.realm' => "http://lookmumimontheinternet.com/staging/hybrid",
'openid.mode' => @$_REQUEST['openid_mode'],
'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.type.country' => 'http://axschema.org/contact/country/home',
'openid.ext1.type.lang' => 'http://axschema.org/pref/language',
'openid.ext1.required' => 'email,first,last,country,lang',
'openid.ns.oauth' => 'http://specs.openid.net/extensions/oauth/1.0',
'openid.oauth.consumer' => $CONSUMER_KEY,
'openid.oauth.scope' => implode(' ', $scopes)
);
$openid_ext = array(
'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.type.country' => 'http://axschema.org/contact/country/home',
'openid.ext1.type.lang' => 'http://axschema.org/pref/language',
'openid.ext1.required' => 'email,first,last,country,lang',
'openid.ns.oauth' => 'http://specs.openid.net/extensions/oauth/1.0',
'openid.oauth.consumer' => $CONSUMER_KEY,
'openid.oauth.scope' => implode(' ', $scopes),
'openid.ui.icon' => 'true'
);