fix sample so it uses the latest oauth flow
This commit is contained in:
@@ -6,3 +6,4 @@ syntax: glob
|
|||||||
.gitignore
|
.gitignore
|
||||||
samples/cmdline/*.dat
|
samples/cmdline/*.dat
|
||||||
htmlcov/*
|
htmlcov/*
|
||||||
|
.coverage
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ from apiclient.discovery import build
|
|||||||
from apiclient.ext.appengine import FlowThreeLeggedProperty
|
from apiclient.ext.appengine import FlowThreeLeggedProperty
|
||||||
from apiclient.ext.appengine import OAuthCredentialsProperty
|
from apiclient.ext.appengine import OAuthCredentialsProperty
|
||||||
from apiclient.oauth import FlowThreeLegged
|
from apiclient.oauth import FlowThreeLegged
|
||||||
from apiclient.oauth import buzz_discovery
|
|
||||||
from google.appengine.api import users
|
from google.appengine.api import users
|
||||||
from google.appengine.ext import db
|
from google.appengine.ext import db
|
||||||
from google.appengine.ext import webapp
|
from google.appengine.ext import webapp
|
||||||
@@ -69,7 +68,8 @@ class MainHandler(webapp.RequestHandler):
|
|||||||
'logout': logout
|
'logout': logout
|
||||||
}))
|
}))
|
||||||
else:
|
else:
|
||||||
flow = FlowThreeLegged(buzz_discovery,
|
p = build("buzz", "v1")
|
||||||
|
flow = FlowThreeLegged(p.auth_discovery(),
|
||||||
consumer_key='anonymous',
|
consumer_key='anonymous',
|
||||||
consumer_secret='anonymous',
|
consumer_secret='anonymous',
|
||||||
user_agent='google-api-client-python-buzz-webapp/1.0',
|
user_agent='google-api-client-python-buzz-webapp/1.0',
|
||||||
|
|||||||
Reference in New Issue
Block a user