Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/gcloud-auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,25 @@ you can pass it directly to a :class:`Client <gcloud.client.Client>`:
Google App Engine Environment
-----------------------------

To create :class:`credentials <oauth2client.appengine.AppAssertionCredentials>`
To create
:class:`credentials <oauth2client.contrib.appengine.AppAssertionCredentials>`
just for Google App Engine:

.. code:: python

from oauth2client.appengine import AppAssertionCredentials
from oauth2client.contrib.appengine import AppAssertionCredentials
credentials = AppAssertionCredentials([])

Google Compute Engine Environment
---------------------------------

To create :class:`credentials <oauth2client.gce.AppAssertionCredentials>`
To create
:class:`credentials <oauth2client.contrib.gce.AppAssertionCredentials>`
just for Google Compute Engine:

.. code:: python

from oauth2client.gce import AppAssertionCredentials
from oauth2client.contrib.gce import AppAssertionCredentials
credentials = AppAssertionCredentials([])

Service Accounts
Expand Down
3 changes: 2 additions & 1 deletion gcloud/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
from oauth2client import crypt
from oauth2client.service_account import ServiceAccountCredentials
try:
from oauth2client.appengine import AppAssertionCredentials as _GAECreds
from oauth2client.contrib.appengine import (
AppAssertionCredentials as _GAECreds)
except ImportError:
class _GAECreds(object):
"""Dummy class if not in App Engine environment."""
Expand Down