Flows no longer need to be saved between uses.
Also introduces util.positional declarations.
Reviewed in http://codereview.appspot.com/6441056/.
Fixes issue #136.
diff --git a/samples/appengine/app.yaml b/samples/appengine/app.yaml
index bdc4be1..1361642 100644
--- a/samples/appengine/app.yaml
+++ b/samples/appengine/app.yaml
@@ -4,9 +4,6 @@
api_version: 1
handlers:
-- url: /oauth2callback
- script: oauth2client/appengine.py
-
- url: .*
script: main.py
diff --git a/samples/appengine/main.py b/samples/appengine/main.py
index 309376c..f649bfb 100644
--- a/samples/appengine/main.py
+++ b/samples/appengine/main.py
@@ -66,8 +66,8 @@
service = build("plus", "v1", http=http)
decorator = oauth2decorator_from_clientsecrets(
CLIENT_SECRETS,
- 'https://www.googleapis.com/auth/plus.me',
- MISSING_CLIENT_SECRETS_MESSAGE)
+ scope='https://www.googleapis.com/auth/plus.me',
+ message=MISSING_CLIENT_SECRETS_MESSAGE)
class MainHandler(webapp.RequestHandler):
@@ -87,7 +87,7 @@
def get(self):
try:
http = decorator.http()
- user = service.people().get(userId='me').execute(http)
+ user = service.people().get(userId='me').execute(http=http)
text = 'Hello, %s!' % user['displayName']
path = os.path.join(os.path.dirname(__file__), 'welcome.html')
@@ -101,6 +101,7 @@
[
('/', MainHandler),
('/about', AboutHandler),
+ (decorator.callback_path, decorator.callback_handler()),
],
debug=True)
run_wsgi_app(application)