/google-auth-library-php

Google Auth Library for PHP

Primary LanguagePHPApache License 2.0Apache-2.0

Google Auth Library for PHP

Homepage
http://www.github.com/google/google-auth-library-php
Authors
Tim Emiola
Stanley Cheung
Copyright
Copyright © 2015 Google, Inc.
License
Apache 2.0

Description

This is Google's officially supported PHP client library for using OAuth 2.0 authorization and authentication with Google APIs.

Alpha

This library is in Alpha. We will make an effort to support the library, but we reserve the right to make incompatible changes when necessary.

Installing via Composer

The recommended way to install the google auth library is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest stable version:

composer.phar require google/auth

Application Default Credentials

This library provides an implementation of application default credentials for PHP.

The Application Default Credentials provide a simple way to get authorization credentials for use in calling Google APIs.

They are best suited for cases when the call needs to have the same identity and authorization level for the application independent of the user. This is the recommended approach to authorize calls to Cloud APIs, particularly when you're building an application that uses Google Compute Engine.

What about auth in google-apis-php-client?

The goal is for auth done by google-apis-php-client to be be performed by this library.

Eventually, google-apis-php-client should have a dependency on this library. At the moment, there is no ETA for this, a key prequisite being for google-apis-php-client itself take a dependency on Guzzle so that it can use the Guzzle subscribers that this package provides. That's currently being discussed. This package's availability should make that transition simpler as there is one less thing that need to be handled.

License

This library is licensed under Apache 2.0. Full license text is available in COPYING.

Contributing

See CONTRIBUTING.

Support

Please report bugs at the project on Github. Don't hesitate to ask questions about the client or APIs on StackOverflow.