简体   繁体   English

如何实现openId基于java web的应用程序?

[英]How to implement openId java web based application?

In my web application i want to implement the OpenId just like stackoverflow.com have to login to its web-site. 在我的Web应用程序中,我想实现OpenId,就像stackoverflow.com必须登录到其网站一样。

In details you find while login to stackoverflow.com 您可以在登录stackoverflow.com时找到详细信息 替代文字

So when if one choose google then it allow the uses to log in through google account. 因此,如果一个人选择谷歌,那么它允许用户通过谷歌帐户登录。

Please tell me how to implement it in java web application in details. 请详细告诉我如何在java web应用程序中实现它。 Is there any single api for login through different website like(yahoo,google,facebook,etc) 是否有任何单一的api登录通过不同的网站,如(雅虎,谷歌,脸书等)

Thanks 谢谢

There is two sides of this: 这有两个方面:

  • client-side. 客户端。 This is the easier part. 这是更容易的部分。 You can do this manually, but there are already javascript solutions that will render a list of openid providers. 您可以手动执行此操作,但已有javascript解决方案将呈现openid提供程序列表。 Check openid-selector and this jQuery plugin . 检查openid-selector这个jQuery插件 I personally like the latter more. 我个人更喜欢后者。
  • server-side. 服务器端。 You will have to handle openId authentication. 您必须处理openId身份验证。 There are multiple java libraries (they are all listed on the openid website). 有多个java库(它们都在openid网站上列出)。 Here is one that I decided to use: openid4java . 这是我决定使用的一个: openid4java See this question for my motivation. 看看这个问题我的动机。

Not quite. 不完全的。 Most of the ones you have mentioned simply use the OpenID protocol, however Facebook uses its own authorisation, so you would need to add that as a separate method. 您提到的大多数只是使用OpenID协议,但Facebook使用自己的授权,因此您需要将其作为单独的方法添加。

Take a look at OpenID4Java 看看OpenID4Java

I have also used the openid-selector for the client side part. 我也使用openid-selector作为客户端部分。

Finally, I would take a look at the this resource to see the URL endpoints for the different providers. 最后,我将查看此资源以查看不同提供程序的URL端点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Java中实现OpenID - How to implement OpenID in Java 如何在Java Web应用程序中实现基于PKI证书的身份验证 - How to implement PKI certificate based authentication in Java Web application 如何实现Java Web应用程序属性缓存? - How to implement java web application properties caching? 如何在Java Web应用程序中实现DownloadManager? - How to implement DownloadManager in Java Web Application? Java Web应用程序:如何实现缓存技术? - Java Web Application: How to implement caching techniques? 如何在 JAVA spring core/struts2 基于 web 应用程序中实现文件内容病毒扫描程序? - How to implement file content virus scanner in a JAVA spring core/struts2 based web application? 如何在基于Java的Web应用程序中使用ADFS - How to use ADFS in Java based web application 如何基于规则对Web应用程序工作流实施约束 - how to implement constraints on a web application workflow based on rules 如何为 Spring 启动 JAVA 实现 OpenID(单点登录)? - How to implement OpenID (Single Sign On) for Spring Boot JAVA? 如何在Java Web应用程序中实现复杂的页面流 - How to implement a complex page flow in a Java Web application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM