2016-06-18 20 views
1

ORCID(Open Researcher and Contributor ID)是否有任何Spring Social客戶端模塊?已經有用於服務提供商,如Spring Social FacebookSpring Social TwitterSpring Social LinkedInORCID有沒有Spring社交客戶端模塊?

ORCID提供了一個區別不同研究者持久數字標識符客戶端模塊。它已被全球採用,截至撰寫本文時(2016年6月),已有將近兩千五百萬ORCID iD註冊。

ORCID根據OAuth 2.0協議提供帶ORCID的SSO(單點登錄)服務。 ORCID支持SSO需要越來越多的Web應用程序。例如,可能有更多的Web應用程序需要使用ORCID的基於OAuth 2.0的REST API來向ORCID註冊中心提交文章/數據。

Spring Social框架已被廣泛用於將Spring應用程序連接到軟件即服務(SaaS)API提供程序,如Facebook,Twitter和LinkedIn。 ORCID的春季社交客戶端模塊,類似於Spring Social Facebook等,將極大地簡化上述Web應用程序的開發,並且這將對出版商,研究機構等在所有學科領域的學術領域非常有益世界。

回答

2

我創建了the Spring Social ORCID project,作爲Spring Social的一個擴展,可以與ORCID集成。 (注意:我已經將這個項目投入到了歐洲PMC,新版本將發佈到its GitHub repository

我也寫了an example web application,它使用Spring Social ORCID模塊(以及Spring Social Facebook)來測試模塊和也以與使用Spring Social Facebook幾乎相同的方式演示如何使用它。

不只是Web應用程序,您還可以在您的Web服務中使用Spring Social ORCID,如the spring social orcid client example project on the rest_web_service branch所示。該Web服務還支持「記住我」功能。

任何Web應用程序都可以通過JavaScript使用基於Spring Social ORCID的Web服務連接到ORCID。我創建了another example project來演示這一點,它也利用了記住我的功能。

Spring社交ORCID項目還遠未完善,但我認爲這不是一個糟糕的開始:-)歡迎您分享並幫助改進它。

0

爲了跟蹤Yuci,我創建了一個Spring和Spring引導集成示例的存儲庫。有些需要的只是配置。 ORCID最近發佈了OpenID Connect和隱式OAuth功能,現在您還可以使用少量的JavaScript來進行客戶端身份驗證。

在ORCID結束的變化意味着春天啓動需要什麼比this更多:

@SpringBootApplication 
@EnableOAuth2Sso 
@Controller 
public class ReallySimpleOrcidOauthApplication { 

    @RequestMapping("/") 
    @ResponseBody 
    public final String home() { 
     return "Welcome, " + SecurityContextHolder.getContext().getAuthentication().getName(); 
    } 

    public static void main(String[] args) { 
     SpringApplication application = new SpringApplication(ReallySimpleOrcidOauthApplication.class); 
     Properties properties = new Properties(); 
     properties.put("security.oauth2.client.clientId", "XXX"); 
     properties.put("security.oauth2.client.clientSecret", "XXX"); 
     properties.put("security.oauth2.client.accessTokenUri", "https://sandbox.orcid.org/oauth/token"); 
     properties.put("security.oauth2.client.userAuthorizationUri", "https://sandbox.orcid.org/oauth/authorize"); 
     properties.put("security.oauth2.client.tokenName", "access_token"); 
     properties.put("security.oauth2.client.scope", "openid"); 
     properties.put("security.oauth2.resource.userInfoUri", "https://sandbox.orcid.org/oauth/userinfo"); 
     application.setDefaultProperties(properties); 
     application.run(args); 
    } 
} 

有使用JWT以及客戶端僅隱流的例子。這個和更多ORCID OAuth和OpenID連接示例可以是found on github

相關問題