-
Notifications
You must be signed in to change notification settings - Fork 4
Home
The Spring Social ORCID project is an extension to Spring Social that enables integration with ORCID.
ORCID provides a persistent digital identifier that distinguishes one researcher from another and, through integration in key research workflows such as manuscript and grant submission, supports automated linkages between a researcher and his/her professional activities ensuring that his/her work is recognized.
ORCID has been globally adopted, and at the time of writing (10 May 2016), there are over two millions of ORCID iDs registered.
Spring Social ORCID enables integration with ORCID with OrcidConnectionFactory, a connection factory that can be plugged into Spring Social’s service provider connection framework, and with an API binding to ORCID’s REST API.
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-orcid</artifactId>
<version>1.0.0</version>
</dependency>
As an extension to Spring Social, Spring Social ORCID depends on Spring Social. Spring Social’s core module will be transitively resolved from the Spring Social ORCID dependency. If you’ll be using Spring Social’s web module, you’ll need to add that dependency yourself.
In Maven pom.xml:
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-web</artifactId>
<version>1.1.3.RELEASE</version>
</dependency>
Note that Spring Social ORCID releases on a different schedule than Spring Social. Consequently, Spring Social’s version differs from that of Spring Social ORCID.
-
First of all, you need to apply to the ORCID Foundation for an client application, and the ORCID Foundation will give you an application client ID with its secret.
-
In your Spring Social application, you need to set the ORCID client ID and also its secret, for instance in a properties file (E.g., social.properties)
orcid.clientId=xxxxxxxxxxxxxxxxxxxxxxx
orcid.clientSecret=xxxxxxxxxxxxxxxxxxxxxxx
-
Import the ORCID configuration in your application's Spring context (E.g., spring-social-context.xml) as below:
<beans:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <beans:property name="location"> beans:value/WEB-INF/spring/social.properties</beans:value> </beans:property> </beans:bean>
<beans:import resource="classpath:/org/springframework/social/orcid/configuration.xml" />
-
By default, Spring Social ORCID points to ORCID Sandbox. Whenever you would like to use the ORCID production registry, you need to re-define the following properties as below, in the social.properties for example:
orcid.frontendUrl=https://orcid.org/
orcid.messageSchemaVersion=1.2
orcid.apiUrl=https://api.orcid.org/v${orcid.messageSchemaVersion}/
orcid.pubApiUrl=https://pub.orcid.org/v${orcid.messageSchemaVersion}/
orcid.authorizeUrl=https://orcid.org/oauth/authorize
orcid.accessTokenUrl=https://api.orcid.org/oauth/token
- Spring Social: http://docs.spring.io/spring-social/docs/1.1.0.RELEASE/reference/htmlsingle/#section_implementing
- ORCID OAuth Authorization: http://members.orcid.org/api/tokens-through-3-legged-oauth-authorization