From 09aae55e871886229c00d67f502c95b51677ccd4 Mon Sep 17 00:00:00 2001 From: Danny Hermes <daniel.j.hermes@gmail.com> Date: Tue, 25 Aug 2015 10:58:21 -0700 Subject: [PATCH] Add basic discussion of clients to auth doc. --- docs/gcloud-auth.rst | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/gcloud-auth.rst b/docs/gcloud-auth.rst index ecd0f7b25c4a..160dcd0a39f0 100644 --- a/docs/gcloud-auth.rst +++ b/docs/gcloud-auth.rst @@ -1,8 +1,10 @@ Authentication -------------- -Quick overview -============== +.. _Overview: + +Overview +======== * **If you're running in Compute Engine or App Engine**, authentication should "just work". @@ -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