GAuth Svc Acct

Component ID

2390251

Component name

GAuth Svc Acct

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Google OAuth2 Service Account

This module allows you to authenticate with Google, using a service account and OAuth 2.0. After you create a service account using Google Developers Console or a similar tool, you may use this module to access Google service APIs using that account. Service accounts use hidden, prepared authentication files instead of passwords supplied at access time. This makes them suitable for cron tasks and other site-controlled access to Google services.

You need a generated key-pair file, with extension .p12, and the email address created to authenticate the service account. Other fields returned by the service-account definition process are not used by this module. To access items such as calendars, the email address used in this module must have permission to access the information as necessary. The key-pair file should be stored in an area NOT accessible to the web,
such as the configured private file directory.

This module is only used to configure and validate service account parameters and to provide a method to return a new Google_Client to use for API access.

It was inspired by the gauth module and the service-account connection example in the 1.1.1 version of the google-api-php-client library. At this time, the most current version of the PHP client library may be found at https://github.com/google/google-api-php-client. That is the only version available, and is subject to revision. The library should be downloaded into the libraries directory as google-api-php-client. For production, the examples and tests directories may be removed. All other files and directories should remain.

This module is very lightweight and is not associated with a specific version of the Google library. This avoids tying the account connection to a specific set of other Google functionality, such as new Google client services. (If the Google library changes, the code may break. Post an issue and it will be addressed. The libraries_info hook is used to support multiple versions of the library. This version has been tested with Google library versions 1.1.1 and 1.1.5, allowing for a change that occurred in version 1.1.3.)

The Google Calendar Merge module uses this module. You can find working code there that uses a client connection to Google services. If you want to test this module by using it, you can use that module.

This module is in use on a production website.

REQUIREMENTS
------------
1. Libraries API - This modules depends on libraries apis module.
You can download from http://drupal.org/project/libraries

2. Google client library - You need to download google api php client library
from https://github.com/google/google-api-php-client. The status report shows the
loaded version.