Skip to content

Commit

Permalink
Add audiences to the auth method sample (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
saicheems authored and Jon Wayne Parrott committed Aug 15, 2016
1 parent 2c897d0 commit 79ff40c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion appengine/standard/endpoints-frameworks-v2/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 79ff40c

Please sign in to comment.