-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Return the full name of the student as part of the OpenId response. #1941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -818,23 +818,12 @@ def provider_login(request): | |
| url = endpoint + urlquote(user.username) | ||
| response = openid_request.answer(True, None, url) | ||
|
|
||
| # TODO: for CS50 we are forcibly returning the username | ||
| # instead of fullname. In the OpenID simple registration | ||
| # extension, we don't have to return any fields we don't | ||
| # want to, even if they were marked as required by the | ||
| # Consumer. The behavior of what to do when there are | ||
| # missing fields is up to the Consumer. The proper change | ||
| # should only return the username, however this will likely | ||
| # break the CS50 client. Temporarily we will be returning | ||
| # username filling in for fullname in addition to username | ||
| # as sreg nickname. | ||
|
|
||
| # Note too that this is hardcoded, and not really responding to | ||
| # the extensions that were registered in the first place. | ||
| results = { | ||
| 'nickname': user.username, | ||
| 'email': user.email, | ||
| 'fullname': user.username | ||
| 'fullname': user.profile.name, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand the original reason for using username instead of profile.name. At first I thought maybe the concern would be that the profile.name might be zero-length. But I wonder if the real motivation was because they were pulling out this value and then storing it for use elsewhere to be the login identifier that would be passed back in later. Don't know, but is there any chance that this might be zero-length?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't let people register with a 0 length name, and we don't let them change to a 0 length name later, so this should be fine from that perspective. I think originally there was some paranoia about privacy concerns around sending across the fullname, but I guess now we're willing to compromise by warning people about what information we're sending over.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great! Thanks for checking. |
||
| } | ||
|
|
||
| # the request succeeded: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest using unicode backslash notation for this, rather than changing the file encoding to utf-8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I just like the little unicode snowman staring back at me.