Skip to content

Commit

Permalink
Merge pull request #1087 from dhermes/auth-discuss-clients
Browse files Browse the repository at this point in the history
Add basic discussion of clients to auth doc.
  • Loading branch information
dhermes committed Aug 25, 2015
2 parents ac13419 + 09aae55 commit ead33cc
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions docs/gcloud-auth.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Authentication
--------------

Quick overview
==============
.. _Overview:

Overview
========

* **If you're running in Compute Engine or App Engine**,
authentication should "just work".
Expand All @@ -24,3 +26,20 @@ Quick overview
.. code-block:: bash
$ export GOOGLE_APPLICATION_CREDENTIALS="/path/to/keyfile.json"
Client-Provided Authentication
==============================

Every package uses a :class:`Client <gcloud.client.Client>` as a base
for interacting with an API. For example:

.. code-block:: python
from gcloud import datastore
client = datastore.Client()
Passing no arguments at all will "just work" if you've following the
instructions in the :ref:`Overview`. The credentials are inferred from your
local environment by using Google `Application Default Credentials`_.

.. _Application Default Credentials: https://developers.google.com/identity/protocols/application-default-credentials

0 comments on commit ead33cc

Please sign in to comment.