-
Notifications
You must be signed in to change notification settings - Fork 1
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
Integrate the public Orcid API to simplify person lookup for project-affiliated contacts #986
base: development
Are you sure you want to change the base?
Integrate the public Orcid API to simplify person lookup for project-affiliated contacts #986
Conversation
…pi-search-for-person-query
…pi-search-for-person-query
|
…y link to sandbox during development. Finally ensure that edge cases are handled (Exception handling, wild card searches etc.)
…o contain Oidc and OidcIssuer
…ndary between application and domain
… orcid during testing if necessary
…pi-search-for-person-query
… during the edit case
…on-query' of https://github.com/qbicsoftware/data-manager-app into feature/#948-integrate-orcid-public-api-search-for-person-query
Just to give a quick update: This PR now works as intended, however the UI is basic and still needs to be confirmed with @Shraddha0903. Additionally the PR was tested with orcid Sandbox Instance so this needs to be adapted to the real orcid repository.
Open Questions include: 1.) I had to extend the project information in the database to contain the oidc information for all 3 contacts (principal investigator, project manager, person responsible). I'd rather refactor this into a seperate table, maybe in a new PR? 2.) Understanding and extending the BoundContactField is actually not trivial and we get a lot of complicated edge cases due to the Vaadin implementations. This could be refactored way easier without employing any of the Vaadin Customfield logic and just write it more basic. 3.) The Contact information was now extended to also include the oidc and oidcissuer information since some of our users have it and some don't. The question is then why we still employ 2 distinct qbicuserdetails. 4.) I also had to account for a lot of edge cases due to the HTTP responses from the orcid responses such as: a) Special Character usage like e.g. two dashes "--" leads to a 401 response from the repository I really appreciate a throughout review and feedback 👍 |
@Override | ||
public List<Contact> findAll(String query, int limit, int offset) { | ||
//Orcid queries will fail if the user input is not sanitized | ||
var sanitizedInput = query.replaceAll("[^a-zA-Z0-9]", ""); |
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.
For me sanitation is a service concern, not a repository one. I would also not allow it, instead of magically removing stuff. If the user puts in weird characters, you can return an empty result.
Uses the public Orcid API to look up persons that the user might want to add as contact in a project.