Skip to content
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

[Feature] ORCID login [#OSF-5162, 6881, 6885] #6192

Merged
merged 49 commits into from
Aug 26, 2016
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
aa34e8f
ORCID Login: update `User` model.
cslzchen Aug 19, 2016
4985794
Add support for OSF to handle cas service ticket from oauth login.
cslzchen Aug 19, 2016
aa7f563
Add `oauth_user_email_[get|post]` for first-time oauth-login users to…
cslzchen Aug 19, 2016
cecc0bd
Update `User.oauth`, `User.create_unconfirmed()` and `get_user()`.
cslzchen Aug 20, 2016
ee563c4
Update `oauth_user_email_[get|post]`:
cslzchen Aug 20, 2016
5bc7939
Implement account creation for new user login thorugh oauth. [skip ci]
cslzchen Aug 21, 2016
609fcac
Refactor `oauth` to `external_identiy`:
cslzchen Aug 22, 2016
e09480f
Refactor `User.external_identity` to include `status`:
cslzchen Aug 22, 2016
ce1a2c8
Update auth logic with new `User.external_identity.status`:
cslzchen Aug 22, 2016
296fcef
Partially implement account linking for external login. [skip ci]
cslzchen Aug 22, 2016
3e7ddde
Fully implement account linking logic for external login and update a…
cslzchen Aug 22, 2016
99aa7c9
Merge remote-tracking branch 'cos/pr/6177' into HEAD
mfraezz Aug 23, 2016
0c44ee0
Add external_identity to default keys in test
mfraezz Aug 23, 2016
76c21d7
Fix method name
mfraezz Aug 23, 2016
65bdf8c
Normalize key
mfraezz Aug 23, 2016
fb16f2e
Add auth tests
mfraezz Aug 23, 2016
15d22de
Add model tests
mfraezz Aug 23, 2016
fd8a93b
Use service-specific verification email templates
mfraezz Aug 23, 2016
88e59cc
Add tests for external_login_confirm_email
mfraezz Aug 23, 2016
150575c
Add template for link success
mfraezz Aug 23, 2016
63e45da
Update `external_first_login_authenticate()` to match CAS service res…
cslzchen Aug 23, 2016
2e03a84
Add valid external identity providers list and map profile name to pr…
cslzchen Aug 23, 2016
853ac3a
Update `make_response_from_ticket()` for new CAS service response:
cslzchen Aug 23, 2016
550a9ef
Merge remote-tracking branch 'upstream/feature/orcid-login' into feat…
cslzchen Aug 23, 2016
5fd21e6
Several minor updates:
cslzchen Aug 23, 2016
e2a4add
Support user merging for external_identities
mfraezz Aug 23, 2016
fbdbc1c
Merge remote-tracking branch 'cos/pr/6198' into feature/orcid-tests
mfraezz Aug 23, 2016
2412c25
Remove unnecessary kwarg
mfraezz Aug 23, 2016
396ea4b
Update tests
mfraezz Aug 23, 2016
d17eefd
Update forgotten test
mfraezz Aug 23, 2016
69a9e30
Add test for `external_login_email_get()`.
cslzchen Aug 23, 2016
85ef767
Several minor updates:
cslzchen Aug 23, 2016
3a71b0d
Add test for `external_login_email_get()`.
cslzchen Aug 23, 2016
8debe14
Merge remote-tracking branch 'upstream/feature/orcid-login' into feat…
cslzchen Aug 23, 2016
cfbbf33
Fix old `User.external_identity` model to support for merging externa…
cslzchen Aug 23, 2016
94f6b71
User can add more than one external id (fix the overwrite issue).
cslzchen Aug 23, 2016
3fa7b15
Fix key error in `User.external_identity`.
cslzchen Aug 24, 2016
fe6b1f8
Merge remote-tracking branch 'cos/pr/6200' into HEAD
mfraezz Aug 24, 2016
a0a88dd
Remove duplicate save call
mfraezz Aug 24, 2016
7d845e0
Fix external_identity preservation during merge
mfraezz Aug 24, 2016
0aa08eb
Add merge test for external_identity
mfraezz Aug 24, 2016
967d4c6
external account cancel option to avoid login loop
icereval Aug 24, 2016
86724d3
Prevent possible KeyError if fields omitted
mfraezz Aug 24, 2016
5ac4c83
[Feature] Add support for revoking ORCID login (#6212)
mfraezz Aug 25, 2016
19e7300
Send PATCH instead of DELETE
mfraezz Aug 25, 2016
94ba9b4
Add social linking language to email
mfraezz Aug 25, 2016
7f0f43f
Improve security of external identities
mfraezz Aug 25, 2016
b0f9129
Ensure unreg users are registered on confirm
mfraezz Aug 25, 2016
442cf3c
Add defaults for cas_response names
mfraezz Aug 25, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion framework/auth/cas.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def make_response_from_ticket(ticket, service_url):
user = {
'external_id_provider': external_credential['provider'],
'external_id': external_credential['id'],
'fullname': cas_resp.attributes['given-names'] + ' ' + cas_resp.attributes['family-name'],
'fullname': '{} {}'.format(cas_resp.attributes.get('given-names'), cas_resp.attributes.get('family-name')),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI: If both names are empty, use the ORCiD id instead. (HotFixed)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing on the ORCiD website, they seemed to disallow an empty given-names.

Copy link
Contributor

@cslzchen cslzchen Sep 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User can make their profile private and only ORCiD is returned. This is a very rare case we happened to run into. :)

'access_token': cas_resp.attributes['accessToken'],
}
return external_first_login_authenticate(
Expand Down