У меня много проблем с созданием приложения для магазина приложений Google.
Я пробовал множество демоверсий, включая пример php hello world, который вы можете скачать с Google.В каждом случае openid работает нормально, но oauth не работает.
Я отследил его до гибридного запроса openid / oauth, не возвращающего токен запроса oauth.Вы можете увидеть мою версию гибридного стандартного демо из googlecodesamples здесь http://lookmumimontheinternet.com/staging/hybrid/index.php
Вы можете видеть, что я прекращаю перенаправление и выводу URL в ссылке для отладки.Я также выводю все, что возвращается в объекте $ _REQUEST.
Это связано с приложением Market Place с следующим манифестом:
<?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>
здесь приведена конфигурация phpмоя установка демо (я знаю, что не должен публиковать секрет, но это только тестовое приложение):
$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'
);
Когда вы запускаете демо, вы можете видеть, что токен oauth не возвращается, даже если онзапрашивается (правильно, насколько я могу видеть).Кто-нибудь может увидеть, что я здесь делаю неправильно?