-
Notifications
You must be signed in to change notification settings - Fork 11
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
authentication: ORCID OAuth #39
Conversation
You can use this ORCID test account: Username: sebastien.deleze@rero.ch |
sonar/config.py
Outdated
'sonar.ch', | ||
'localhost', | ||
'127.0.0.1', | ||
'sonardev.test.rero.ch', |
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.
why? perhaps a small comment.
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.
It's not mandatory, I removed it..
sonar/modules/oauth/ext.py
Outdated
@@ -0,0 +1,31 @@ | |||
# -*- coding: 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.
why do you need an new extension?
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.
I effectively don't need an extension. That's now removed
sonar/modules/oauth/orcid.py
Outdated
'full_name': 'Full Name', | ||
}, | ||
}, | ||
'external_id': 'github-unique-identifier', |
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.
github or orcid?
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.
corrected
sonar/modules/oauth/orcid.py
Outdated
|
||
:param orcid_id: ORCID identifier | ||
:param token: Access token for querying API | ||
:return: Dict of record or None |
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.
would be nice to have an idea of the form of the returned record.
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.
I provided an example in the docstring, but not with the full structure, because it's quite long
NEW OAuth authentication with ORCID api. Signed-off-by: Sébastien Délèze <sebastien.deleze@rero.ch>
NEW OAuth authentication with ORCID api.