Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"forum": "https://groups.google.com/forum/#!forum/google-appengine"
},
"require": {
"php": ">=5.4.0"
"php": ">=5.4.0",
"google/protobuf": "^3.15"
},
"require-dev": {
"mikey179/vfsstream": "~1",
Expand All @@ -19,7 +20,8 @@
},
"autoload": {
"psr-4": {
"Google\\AppEngine\\": "src"
"Google\\AppEngine\\": "src",
"GPBMetadata\\": "metadata"
},
"files": [
"src/aliases.php"
Expand All @@ -28,7 +30,6 @@
"src/Api/api_base_pb.php",
"src/Api/Memcache/memcache_service_pb.php",
"src/Api/Urlfetch/urlfetch_service_pb.php",
"src/Api/AppIdentity/app_identity_service_pb.php",
"src/Datastore/action_pb.php",
"src/Datastore/datastore_v3_pb.php",
"src/Datastore/datastore_v4_pb.php",
Expand Down
Binary file added metadata/AppIdentityService.php
Binary file not shown.
33 changes: 17 additions & 16 deletions src/Api/AppIdentity/AppIdentityService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

namespace Google\AppEngine\Api\AppIdentity;

use google\appengine\AppIdentityServiceError\ErrorCode;
use google\appengine\GetAccessTokenRequest;
use google\appengine\GetAccessTokenResponse;
use google\appengine\GetPublicCertificateForAppRequest;
use google\appengine\GetPublicCertificateForAppResponse;
use google\appengine\GetServiceAccountNameRequest;
use google\appengine\GetServiceAccountNameResponse;
use google\appengine\SignForAppRequest;
use google\appengine\SignForAppResponse;
use Google\AppEngine\Api\AppIdentity\AppIdentityServiceError\ErrorCode;
use Google\AppEngine\Api\AppIdentity\GetAccessTokenRequest;
use Google\AppEngine\Api\AppIdentity\GetAccessTokenResponse;
use Google\AppEngine\Api\AppIdentity\GetPublicCertificateForAppRequest;
use Google\AppEngine\Api\AppIdentity\GetPublicCertificateForAppResponse;
use Google\AppEngine\Api\AppIdentity\GetServiceAccountNameRequest;
use Google\AppEngine\Api\AppIdentity\GetServiceAccountNameResponse;
use Google\AppEngine\Api\AppIdentity\SignForAppRequest;
use Google\AppEngine\Api\AppIdentity\SignForAppResponse;
use Google\AppEngine\Runtime\ApiProxy;
use Google\AppEngine\Runtime\ApplicationError;
use Google\AppEngine\Runtime\Memcache;
Expand Down Expand Up @@ -137,9 +137,11 @@ public static function getPublicCertificates() {

$result = [];

foreach ($resp->getPublicCertificateListList() as $cert) {
$result[] = new PublicCertificate($cert->getKeyName(),
$cert->getX509CertificatePem());
foreach ($resp->getPublicCertificateList() as $cert) {
$pub_cert = new PublicCertificate();
$pub_cert->setKeyName($cert->getKeyName());
$pub_cert->setX509CertificatePem($cert->getX509CertificatePem());
$result[] = $pub_cert;
}

return $result;
Expand Down Expand Up @@ -212,16 +214,15 @@ private static function getAccessTokenUncached($scopes) {
$resp = new GetAccessTokenResponse();

if (is_string($scopes)) {
$req->addScope($scopes);
$req->setScope([$scopes]);
} else if (is_array($scopes)) {
foreach($scopes as $scope) {
if (is_string($scope)) {
$req->addScope($scope);
} else {
if (!is_string($scope)) {
throw new \InvalidArgumentException(
'Invalid scope ' . htmlspecialchars($scope));
}
}
$req->setScope($scopes);
} else {
throw new \InvalidArgumentException(
'Invalid scope ' . htmlspecialchars($scopes));
Expand Down
31 changes: 31 additions & 0 deletions src/Api/AppIdentity/AppIdentityServiceError.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions src/Api/AppIdentity/AppIdentityServiceError/ErrorCode.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions src/Api/AppIdentity/AppIdentityServiceError_ErrorCode.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading