adsabs / orcid-service

Web service for ORCID
MIT License
1 stars 10 forks source link

Added endpoint for pipeline to update profile #34

Closed kelockhart closed 5 years ago

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.04%) to 89.481% when pulling 15d5e6be5e4fb68d967e9168bc7acc3c306600a6 on kelockhart:pipeline-update into 0bdc61c7d31a5dd2269a52f56491a12cdbc83c37 on adsabs:master.

romanchyla commented 5 years ago

i've lost track of the context, so here is the only useful comment I can make now:

update_profile and update_profile_local seem to belong to different places; update_profile inside microservice and update_profile_local inside the pipeline - the reason being: the microservice serves as a proxy for fetching orcid data but doesn't analyze it; the pipeline being the place where the logic of deciding what needs to be updated happens

but i might have forgotten particulars of why it needs to live inside the microservice; so feel free to post a short explanatory comment and merge the changes into the master

kelockhart commented 5 years ago

update_profile_local is updating the microservice's copy of the user's profile, which is what BBB now uses. The pipeline verifies the veracity of each claim and updates the microservice's copy of the user profile with that info. But to make sure the pipeline and the microservice have the same version of the user profile, the pipeline first triggers an update of the microservice's version of the profile (using update_profile_local) before it checks all the claims. This new endpoint is basically a pipeline-specific version of update_profile_local that doesn't need to be passed the user's ORCID token - it just grabs it from local storage instead, like the other pipeline-specific endpoints do.