projects
/
zzz-spline-users.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f6f1754
)
Handle a cancel response from OpenID.
author
Eevee
<git@veekun.com>
Mon, 26 Jul 2010 05:45:46 +0000
(22:45 -0700)
committer
Eevee
<git@veekun.com>
Mon, 26 Jul 2010 05:45:46 +0000
(22:45 -0700)
splinext/users/controllers/accounts.py
patch
|
blob
|
history
diff --git
a/splinext/users/controllers/accounts.py
b/splinext/users/controllers/accounts.py
index
a4c1b71
..
c70ad6d
100644
(file)
--- a/
splinext/users/controllers/accounts.py
+++ b/
splinext/users/controllers/accounts.py
@@
-1,5
+1,5
@@
import logging
import logging
-from openid.consumer.consumer import Consumer
+from openid.consumer.consumer import Consumer
, SUCCESS, CANCEL
from openid.extensions.sreg import SRegRequest, SRegResponse
from openid.store.filestore import FileOpenIDStore
from openid.yadis.discover import DiscoveryFailure
from openid.extensions.sreg import SRegRequest, SRegResponse
from openid.store.filestore import FileOpenIDStore
from openid.yadis.discover import DiscoveryFailure
@@
-69,7
+69,11
@@
class AccountsController(BaseController):
return_url = url(host=host, controller='accounts', action='login_finish')
res = cons.complete(request.params, return_url)
return_url = url(host=host, controller='accounts', action='login_finish')
res = cons.complete(request.params, return_url)
- if res.status != 'success':
+ if res.status == CANCEL:
+ # I guess.. just.. back to the homepage?
+ h.flash(u"""Login canceled.""", icon='user-silhouette')
+ redirect_to(url('/'))
+ elif res.status != SUCCESS:
return 'Error! %s' % res.message
try:
return 'Error! %s' % res.message
try: