如何使用LDAP,应用程序,第三方应用程序等做认证 [英] How to do authentication using LDAP, Application, Third Party application etc

查看:732
本文介绍了如何使用LDAP,应用程序,第三方应用程序等做认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将创建在Java Web应用程序。

We will be creating a web application in java.

有关用户身份验证我们目前正在使用LDAP。但是,我们希望有一些其他的选项,如应用层认证(来自数据库),Gmail中,脸谱等。

For User Authentication currently we are using LDAP. But we want to have some other options like application level authentication (from database) , gmail, facebook etc.

有点类似于堆栈溢出,登录页面上。

Somewhat similar to what stack overflow has on login page.

我们将保持一个属性文件,其中将包括所有可用的选项像LDAP认证,脸谱,Gmail会等。

We will be maintaining a properties file which will consist of all the available options for authentication like LDAP, facebook, gmail etc.

如果我们想增加一个认证服务,我们将在此属性文件添加它,然后我们将需要添加的辅助文件,它会做这样的认证的实际工作。

If we want to add one more authentication service we will add it in this properties file and then we will need to add helper file which will do the actual work of doing the authentication.

这应该是高度可定制的。

This should be highly customizable.

我有这方面的问题之后,

I have following questions regarding this,

1)什么是去了解这一点的最好方法是什么?
2)如何做第三方认证像谷歌,Facebook等?

1) What is the best way to go about this? 2) How to do third party authentication like google, facebook etc?

PS:当我们使用Gmail等做认证,我们将需要一些基本的信息反馈给我们的应用程序,我们可以使用。

PS: When we do the authentication using gmail etc, we will need some basic information back to our application which we can use.

推荐答案

#1(Stackexchange)正在使用的 OpenID的选择。它是高度可定制的,你可以添加你自己的选择也是如此。

Stackoverflow (Stackexchange) is using a modified version of openid-selector. It is highly customizable and you can add your own selectors as well.

您可以用谷歌,Facebook和其他社交网站进行身份验证使用 OpenID的或的 OAuth的机制。您可以使用许多库可供java.Have看看 openid4java 。您也可以参考此列表库为好。

You can authenticate with google, facebook, and other social networking sites using openID or OAuth mechanism. You can make use of many libraries available for java.Have a look at openid4java. You can also refer to this list for libraries as well.

您可以从谷歌,雅虎或其他OpenID提供一些基本信息(姓名,电子邮件,照片等)。

You can get some basic information (Name, Email, Photos etc) from Google, Yahoo or other openid providers.

这篇关于如何使用LDAP,应用程序,第三方应用程序等做认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆