From 79ff40cd8dac665542b8f81e034ac3fcdc0c6f32 Mon Sep 17 00:00:00 2001 From: Sai Cheemalapati Date: Mon, 15 Aug 2016 15:04:54 -0700 Subject: [PATCH] Add audiences to the auth method sample (#452) --- appengine/standard/endpoints-frameworks-v2/backend/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appengine/standard/endpoints-frameworks-v2/backend/main.py b/appengine/standard/endpoints-frameworks-v2/backend/main.py index 2348e1f6edc8..6b5feeefbf52 100644 --- a/appengine/standard/endpoints-frameworks-v2/backend/main.py +++ b/appengine/standard/endpoints-frameworks-v2/backend/main.py @@ -53,7 +53,9 @@ def echo(self, request): path='echo/getUserEmail', http_method='GET', # Require auth tokens to have the following scopes to access this API. - scopes=[endpoints.EMAIL_SCOPE]) + scopes=[endpoints.EMAIL_SCOPE], + # OAuth2 audiences allowed in incoming tokens. + audiences='your-oauth-client-id.com') def get_user_email(self, request): user = endpoints.get_current_user() # If there's no user defined, the request was unauthenticated, so we