Adds OpenID authentication support
Review Request #4641 — Created Sept. 24, 2013 and discarded
This adds OpenID support to ReviewBoard with the use of python-social-auth (previously django-social-auth).
Tested basic functions.
Tested registering with an OpenID and logging in with one.
Tested connecting/disconnecting identifiers from an existing user.
Description | From | Last Updated |
---|---|---|
We should only have one form. I want this to be super slick. If you like, we can polish the … |
chipx86 | |
This UI doesn't feel right. How does it look with multiple identities? "Disconnect" is too big compared to the text. … |
chipx86 | |
The field should be wider. Going with the comment about a list, it might be nicer to have a list … |
chipx86 | |
"Identities" should have a capital "I". |
chipx86 | |
Col: 80 E501 line too long (99 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
'DNS' imported but unused |
reviewbot | |
'S3BotoStorage' imported but unused |
reviewbot | |
'CouchDBStorage' imported but unused |
reviewbot | |
Col: 26 E241 multiple spaces after ':' |
reviewbot | |
Col: 35 E241 multiple spaces after ':' |
reviewbot | |
Col: 80 E501 line too long (87 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (106 > 79 characters) |
reviewbot | |
Col: 107 W291 trailing whitespace |
reviewbot | |
Col: 80 E501 line too long (112 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (111 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (87 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (94 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (96 > 79 characters) |
reviewbot | |
'from settings_local import *' used; unable to detect undefined names |
reviewbot | |
Col: 80 E501 line too long (88 > 79 characters) |
reviewbot | |
'DNS' imported but unused |
reviewbot | |
'S3BotoStorage' imported but unused |
reviewbot | |
'CouchDBStorage' imported but unused |
reviewbot | |
Col: 26 E241 multiple spaces after ':' |
reviewbot | |
Col: 35 E241 multiple spaces after ':' |
reviewbot | |
Col: 55 E502 the backslash is redundant between brackets |
reviewbot | |
'from settings_local import *' used; unable to detect undefined names |
reviewbot | |
Should only be two blank lines between classes. |
chipx86 | |
Won't be needed if it's a dependency. |
chipx86 | |
'DNS' imported but unused |
reviewbot | |
'S3BotoStorage' imported but unused |
reviewbot | |
'CouchDBStorage' imported but unused |
reviewbot | |
Col: 26 E241 multiple spaces after ':' |
reviewbot | |
Col: 35 E241 multiple spaces after ':' |
reviewbot | |
Blank line between these. |
chipx86 | |
There are inconsistencies in these lines. If you're going to have parens, please put the ( on the previous line … |
chipx86 | |
Alignment issue. |
chipx86 | |
These all seem like things that should just go directly in settings. |
chipx86 | |
Blank line before this. |
chipx86 | |
There's far too much copy/paste here. You should instead compose this in three steps. Set it to all the stuff … |
chipx86 | |
Alphabetical order. |
chipx86 | |
Can you leave this unchanged? |
chipx86 | |
'from settings_local import *' used; unable to detect undefined names |
reviewbot | |
This should just be a requirement in setup.py, and then you can depend on it absolutely. |
chipx86 | |
For all the template tags in this, make sure to properly indent (within the {% .. %}) by one space, … |
chipx86 | |
Please use single quotes inside the template tag, for consistency with the first parameter, and to fix styling (since it's … |
chipx86 | |
There are inconsistencies in indentation of HTML tags. |
chipx86 | |
Alphabetical order. |
chipx86 | |
As above, you should be able to depend on this being here. 'print' will cause confusing failures in many WSGI … |
chipx86 | |
Col: 26 E241 multiple spaces after ':' |
reviewbot | |
Col: 35 E241 multiple spaces after ':' |
reviewbot | |
'from settings_local import *' used; unable to detect undefined names |
reviewbot | |
Col: 72 W291 trailing whitespace |
reviewbot | |
Col: 80 E501 line too long (85 > 79 characters) |
reviewbot | |
Col: 36 W291 trailing whitespace |
reviewbot | |
Col: 26 E241 multiple spaces after ':' |
reviewbot | |
Col: 35 E241 multiple spaces after ':' |
reviewbot | |
'from settings_local import *' used; unable to detect undefined names |
reviewbot | |
Col: 36 E128 continuation line under-indented for visual indent |
reviewbot | |
Col: 26 E241 multiple spaces after ':' |
reviewbot | |
Col: 35 E241 multiple spaces after ':' |
reviewbot | |
'from settings_local import *' used; unable to detect undefined names |
reviewbot | |
Col: 36 E128 continuation line under-indented for visual indent |
reviewbot | |
I don't think we need the comment here. |
chipx86 | |
Col: 26 E241 multiple spaces after ':' |
reviewbot | |
Col: 35 E241 multiple spaces after ':' |
reviewbot | |
'from settings_local import *' used; unable to detect undefined names |
reviewbot | |
Why is the social.apps.django_app.default here, and not the list above? django_evolution should always be the last entry. |
chipx86 | |
These should probably be before the settings_local import, so that they can be overridden if needed. The URLs need to … |
chipx86 | |
Blank line before this. |
chipx86 | |
Missing {% trans %} for "Disconnect". |
chipx86 | |
This is too long a line. Should be more like: <td> <input ... /> <input ... /> </td> |
chipx86 | |
No need for a separate urlpatterns here. It should be able to go into one of the above groups. |
chipx86 |
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/admin/checks.py
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
-
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/admin/checks.py
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/admin/checks.py
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
-
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/admin/checks.py
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/admin/checks.py
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
-
- People:
-
Awesome! Is this complete and ready to ship, or is there more to do?
Can you provide screenshots of everything? Login, registration (if affected), admin UI, etc?
-
-
-
-
-
There are inconsistencies in these lines. If you're going to have parens, please put the ( on the previous line instead of using \
-
-
-
-
There's far too much copy/paste here. You should instead compose this in three steps. Set it to all the stuff before create_user, then conditionally add create_user, then add the rest.
-
-
-
-
For all the template tags in this, make sure to properly indent (within the {% .. %}) by one space, relative to the parent template tag. So:
{% block ... %}
{% if ... %}
{% box ... %}
{% if messages %}etc. The
{%
should never be indented at all. Indentation happens within.Also,
{{vars}}
, not{{ vars }}
.Same goes for any other HTML files.
-
Please use single quotes inside the template tag, for consistency with the first parameter, and to fix styling (since it's in an
action=""
) -
-
-
As above, you should be able to depend on this being here.
'print' will cause confusing failures in many WSGI deployments.
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
setup.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
-
-
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
setup.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
setup.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
setup.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
- Change Summary:
-
This fixes the CSRF token for user prefs (because that function had to get the @csrf_protect decorator for disconnection of OpenID).
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
setup.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
setup.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
setup.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/admin/siteconfig.py
reviewboard/settings.py
reviewboard/accounts/views.py
reviewboard/urls.py
setup.py
reviewboard/accounts/forms.py
Ignored Files:
reviewboard/templates/accounts/prefs.html
reviewboard/templates/accounts/login.html -
-
-
We should only have one form. I want this to be super slick. If you like, we can polish the UI, but we'll commit this to a branch first and merge it in when we have time to refactor the UI.
I think something more like http://2.bp.blogspot.com/_EuCTzLdp3vE/SguAL9E94NI/AAAAAAAACfk/1hjbP6RH9h0/s1600-h/openID_1.jpg is what we want, though limited to only a couple providers by default: Google and GitHub. These are likely to be the most common providers, based on what we've seen.
It'd be nice to allow that list to be customized, but let's start there.
There could also be a separate OpenID button that allows any URL to be given (the URL you have here, for instance), but that wouldn't be on the form people see right off the bat.
-
This UI doesn't feel right. How does it look with multiple identities?
"Disconnect" is too big compared to the text. There should also be more spacing.
What I'd suggest is more of a grid look, with the URL on each row and a "Disconnect" link on the right. Sort of like the issue summary table on a review request.
-
The field should be wider.
Going with the comment about a list, it might be nicer to have a list of current ones, and an Add field and link at the bottom that expands to a text field and a button.
I'm assuming that there can be multiple identities.
-
-
-
Why is the social.apps.django_app.default here, and not the list above?
django_evolution should always be the last entry.
-
These should probably be before the settings_local import, so that they can be overridden if needed.
The URLs need to take into account the SITE_ROOT. Actually, they shouldn't be hard-coded paths, either. Can these somehow take Django URL names?
-
-
-
-