Skip to content

Commit

Permalink
config file now prefixed with '.'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Hall committed Jul 9, 2015
1 parent 96b168a commit b64eb65
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ composer.lock
vendor/

# Config.json file changes should be ignored to prevent private API access keys being uploaded to Git
config.json
.config.json

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ PHP library for the Google Contacts API (v3)

## Setup

1. Copy or rename `config_blank.json` to `config.json`.
2. Fill in the `clientID`, `clientSecret` and `redirectUri` in `config.json`.
1. Copy or rename `.config_blank.json` to `.config.json`. Note the
2. Fill in the `clientID`, `clientSecret` and `redirectUri` in `.config.json`.
* Note that `redirectUri` should be configure to point towards the `redirect-handler.php` file.
* The `clientID` and `clientSecret` can be found in the Google Developers console at https://console.developers.google.com/ under 'APIs & auth' -> 'Credentials'.

3. Go to `authorise-application.php` in a web browser. This should give you a URL to authorise your application for Google Contacts.
4. Go to the authorisation URL provided by the previous step.
5. Accept the permissions requested on the page displayed. You should then be redirected back to the `redirect-handler.php` file.
6. The page generated by the `redirect-handler.php` file should then present you with a refresh token. Copy this into your `config.json`.
6. The page generated by the `redirect-handler.php` file should then present you with a refresh token. Copy this into your `.config.json`.
7. Setup is done!


2 changes: 1 addition & 1 deletion helpers/GoogleHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ abstract class GoogleHelper
{
private static function loadConfig()
{
$contents = file_get_contents('config.json');
$contents = file_get_contents('.config.json');

$config = json_decode($contents);

Expand Down

0 comments on commit b64eb65

Please sign in to comment.