Merge lp:~robru/bileto/sso-staging into lp:bileto

Proposed by Robert Bruce Park
Status: Work in progress
Proposed branch: lp:~robru/bileto/sso-staging
Merge into: lp:bileto
Diff against target: 62 lines (+11/-2)
3 files modified
tickets/login.py (+9/-0)
tickets/settings.py (+1/-1)
tickets/static/index.html (+1/-1)
To merge this branch: bzr merge lp:~robru/bileto/sso-staging
Reviewer Review Type Date Requested Status
CU2D maintainers Pending
Review via email: mp+267209@code.launchpad.net

Description of the change

Don't merge, I'm just proposing this to see a total diff.

To post a comment you must log in.

Unmerged revisions

220. By Robert Bruce Park

Merge trunk.

219. By Robert Bruce Park

iterate

218. By Robert Bruce Park

iterate

217. By Robert Bruce Park

log

216. By Robert Bruce Park

Allow GET again

215. By Robert Bruce Park

moar.

214. By Robert Bruce Park

28e61074-3ba9-11e5-9b56-0090f5d859bd

213. By Robert Bruce Park

log

212. By Robert Bruce Park

Let openid explode

211. By Robert Bruce Park

Logging.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tickets/login.py'
2--- tickets/login.py 2015-08-05 21:21:09 +0000
3+++ tickets/login.py 2015-08-06 15:25:15 +0000
4@@ -1,3 +1,6 @@
5+import logging
6+
7+from pprint import pformat
8 from flask import request, session, redirect
9
10 from tickets.app import app, oid
11@@ -7,6 +10,8 @@
12 @app.route('/login', methods=['GET', 'POST'])
13 @oid.loginhandler
14 def login():
15+ logging.info('/login got: {}'.format(request.method))
16+ logging.info(pformat(request.args))
17 if session.get('nickname'):
18 return redirect(oid.get_next_url())
19 openid = request.form.get('openid')
20@@ -20,12 +25,16 @@
21
22 @oid.after_login
23 def identify(resp):
24+ logging.info('hi from after_login!')
25+ logging.info(pformat(dir(resp)))
26 session.update(
27 identity_url=resp.identity_url,
28 fullname=resp.fullname,
29 nickname=resp.nickname,
30 email=resp.email,
31 )
32+ logging.info(pformat(session))
33+ logging.info(pformat(session.data))
34 return redirect(oid.get_next_url())
35
36
37
38=== modified file 'tickets/settings.py'
39--- tickets/settings.py 2015-08-03 07:51:14 +0000
40+++ tickets/settings.py 2015-08-06 15:25:15 +0000
41@@ -6,7 +6,7 @@
42
43 logging.basicConfig(
44 level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s')
45-logging.exception = lambda *ignore: None # OpenID abuses this, sadly.
46+#logging.exception = lambda *ignore: None # OpenID abuses this, sadly.
47
48
49 SESSION_PATH = '/run/shm/bileto/session'
50
51=== modified file 'tickets/static/index.html'
52--- tickets/static/index.html 2015-08-05 17:34:59 +0000
53+++ tickets/static/index.html 2015-08-06 15:25:15 +0000
54@@ -23,7 +23,7 @@
55 <div id="login">
56 <a href="/logout" ng-show="authenticated">log out {{authenticated}}</a>
57 <form action="/login" method=post ng-hide="authenticated">
58-<input type=hidden name=openid value="https://login.ubuntu.com/">
59+<input type=hidden name=openid value="https://login.staging.ubuntu.com/">
60 <input type=submit value="Log in with Ubuntu SSO">
61 <input type=hidden name=next value="/">
62 </form>

Subscribers

People subscribed via source and target branches