0

Following the google identity toolkit for php quickstart (in Windows), (https://developers.google.com/identity/toolkit/web/quickstart/php), steps 1.9 and 2.1 are ambiguous.

Running Apache on :8000 (http//localhost:8000) with

  • c:\root\public for documents
  • c:\root\key for the p12 key directory
  • c:\root\php for private php files

Step 1.9:

change serviceAccountPrivateKeyFile setting to be equal to the path of the *.p12 file you downloaded earlier. You should use the full path, beginning with /and ending with the full name of the *.p12 file.

In windows, should this path look like either of:

 - "c:/root/key/key.p12"
 - "c:\root\key\key.p12"
 - "/root/key/key.p12"

2.1

Download the Google Identity Toolkit PHP quick-start from GitHub and unzip it. You can also find the source code for this quick-start or the client library on Github.

This results in a folder: identity-toolkit-php-master with yet another folder zipped within gitkit-php-composer-package.zip. Which directory should these be unzipped to?

2.3

Install the PHP dependency management tool Composer, and the dependent libraries used by this quick-start. For Windows, installation instructions are on the Composer website (use the composer.json requirements file we included in the quickstart folder). For Linux/Mac, simply run the following commands:

cd identity-toolkit-php-master curl -s https://getcomposer.org/installer | php php composer.phar install php -S localhost:8000 routing.php

Installing from https//getcomposer.org/doc/00-intro.md#installation-windows, should any defaults be changed?

Michael
  • 77
  • 8

1 Answers1

1

The serviceAccountPrivateKeyFile setting will be read by php's file_get_contents. I think the absolute windows path should be fine: c:/root/key/key.p12
I may be wrong about the direction of slashes used. If this doesn't work, just reverse the slashes.

Regarding where to place the contents of the client files identity-toolkit-php-client-master, it shouldn't matter but I would place it in a private directory with other library files. As for the composer step, I believe it will read the composer.json file in the unzipped identity-toolkit-php-client-master which specifies src include files relative to its current location, so I would install and run that in the same directory where the composer.json file is located: identity-toolkit-php-client-master/

Toumash
  • 1,077
  • 11
  • 27
bojeil
  • 29,642
  • 4
  • 69
  • 76