Add GAE to application default credentials.
diff --git a/google/auth/app_engine.py b/google/auth/app_engine.py
index 6f32b23..d20ddf6 100644
--- a/google/auth/app_engine.py
+++ b/google/auth/app_engine.py
@@ -33,6 +33,21 @@
app_identity = None
+def get_project_id():
+ """Gets the project ID for the current App Engine application.
+
+ Returns:
+ str: The project ID
+
+ Raises:
+ EnvironmentError: If the App Engine APIs are unavailable.
+ """
+ if app_identity is None:
+ raise EnvironmentError(
+ 'The App Engine APIs are not available.')
+ return app_identity.get_application_id()
+
+
class Credentials(credentials.Scoped, credentials.Signing,
credentials.Credentials):
"""App Engine standard environment credentials.