Skip to content

Commit 76d73b5

Browse files
author
Kevin Turner
committed
[project @ examples/consumer: SetupNeededResponse.setup_url is None in OpenID 2.0.]
1 parent 75bbc2a commit 76d73b5

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎examples/consumer.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,13 @@ def doProcess(self):
258258
# cancelled
259259
message = 'Verification cancelled'
260260
elif info.status == consumer.SETUP_NEEDED:
261-
message = '<a href=%s>Setup needed</a>' % (
262-
quoteattr(info.setup_url),)
261+
if info.setup_url:
262+
message = '<a href=%s>Setup needed</a>' % (
263+
quoteattr(info.setup_url),)
264+
else:
265+
# This means auth didn't succeed, but you're welcome to try
266+
# non-immediate mode.
267+
message = 'Setup needed'
263268
else:
264269
# Either we don't understand the code or there is no
265270
# openid_url included with the error. Give a generic

‎openid/consumer/consumer.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,7 @@ class SetupNeededResponse(Response):
17331733
@ivar setup_url: A URL that can be used to send the user to the
17341734
server to set up for authentication. The user should be
17351735
redirected in to the setup_url, either in the current window
1736-
or in a new browser window.
1736+
or in a new browser window. C{None} in OpenID 2.0.
17371737
17381738
@cvar status: SETUP_NEEDED
17391739
"""

0 commit comments

Comments
 (0)