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

Store user access token after login #9

Open
2 tasks
nuest opened this issue Sep 21, 2017 · 0 comments
Open
2 tasks

Store user access token after login #9

nuest opened this issue Sep 21, 2017 · 0 comments

Comments

@nuest
Copy link
Member

nuest commented Sep 21, 2017

When we store a user's access token in the session, we could use it later on.

  • Evaluate what "safe and secure" should entail.
  • Check whether this makes sense when only asking for /authenticate because according to to the scope documentation

From the ORCID documentation: https://members.orcid.org/api/integrate/orcid-sign-in

ORCID will then return the researcher’s verified ORCID iD and an access token, along with the refresh token, scope(s), name on the ORCID record, and token expiry. A example response:

   {"access_token":"f5af9f51-07e6-4332-8f1a-c0c11c1e3728","token_type":"bearer",
   "refresh_token":"f725f747-3a65-49f6-a231-3e8944ce464d","expires_in":631138518,
   "scope":"/authorize","name":"Sofia Garcia","orcid":"0000-0001-2345-6789"}

Store the ORCID iD and access token in your system in a safe and secure manner. Both items will be required to perform any action to their ORCID record: read, write, update. If you are only requesting /authorize access, access tokens can be stored to indicate that the iD has been authenticated, as well as to read public access data.

Use the ORCID iD and access token to read the user’s record and populate their profile in your system: Save users time by allowing them to quickly and easily transfer data from their ORCID records to your system. All you need to is to make a quick call to their record:

  Method: GET
  Content-type: application/vnd.orcid+xml or application/vnd.orcid+json
  Authorization type: Bearer
  Access token: [Stored access token]
  End point: https://api.sandbox.orcid.org/v2.0/[Stored ORCID iD]/record
  Example record XML: GitHub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant