如何在我的Google App Engine项目中实施OpenID使用者?

时间:2023-01-13 16:23:33

I want to use OpenID in my Java Google App Engine web application but I don't know where to start...

我想在我的Java Google App Engine Web应用程序中使用OpenID,但我不知道从哪里开始...

I have looked at openid4java and joid.

我看过openid4java和joid。

openid4java says you have to place some libraries on the "endorsed libraries"-path. I don't have one locally on my computer, and I sure don't know how to do that on Google App Engine.

openid4java说你必须在“endorsed libraries”-path上放置一些库。我的电脑上没有本地电脑,我肯定不知道如何在Google App Engine上做到这一点。

joid looks simple enough but doesn't look up to date or something because I get a HTTP 400 back from Google when I try to get an authentication.

joid看起来很简单,但是没有查看日期或者其他东西,因为当我尝试获取身份验证时,我从Google收到了一个HTTP 400。

Any pointers?

4 个解决方案

#2


It should be pretty easy to translate http://appengine-cookbook.appspot.com/recipe/accept-google-aol-yahoo-myspace-facebook-and-openid-logins/ (which provides a Python app engine way to do it) into app engine Java, if going through rpxnow.com is OK with you. If parsing json is a problem you can also request xml results from rpxnow.com. See https://rpxnow.com/docs for more about the RPX API.

翻译http://appengine-cookbook.appspot.com/recipe/accept-google-aol-yahoo-myspace-facebook-and-openid-logins/应该很容易(它提供了一个Python app引擎方式来实现它)进入app引擎Java,如果通过rpxnow.com就可以了。如果解析json是个问题,您也可以从rpxnow.com请求xml结果。有关RPX API的更多信息,请参见https://rpxnow.com/docs。

#3


For the openidjava libraries you would just include this in your project. If you are using Eclipse (it has a great plug-in for GWT and App Engine). Stick the openidjava files in your src directory or the jar in the WEB-INF/lib directory and make sure you add it to your classpath.

对于openidjava库,您只需在项目中包含它。如果您正在使用Eclipse(它有一个很好的插件用于GWT和App Engine)。将openidjava文件粘贴到src目录或WEB-INF / lib目录中的jar中,并确保将其添加到类路径中。

#4


Well, I know this is an old question, but I'm trying now to get openid4java running on App Engine and it is not working. It seems that it uses an "HTTPClient" library that wants to start a new thread and App Engine throws an exception because of that.

好吧,我知道这是一个老问题,但我现在正在尝试在App Engine上运行openid4java并且它无法运行。它似乎使用了一个想要启动新线程的“HTTPClient”库,因此App Engine会引发异常。

So, if you plan to use openid4java on App Engine, look before if there is a solution to this. I just can't find one :(

因此,如果您计划在App Engine上使用openid4java,请先查看是否有解决方案。我只是找不到一个:(

You can see the problem in more detail here and here.

您可以在此处和此处更详细地查看问题。

Hope it helps!

希望能帮助到你!

#1


#2


It should be pretty easy to translate http://appengine-cookbook.appspot.com/recipe/accept-google-aol-yahoo-myspace-facebook-and-openid-logins/ (which provides a Python app engine way to do it) into app engine Java, if going through rpxnow.com is OK with you. If parsing json is a problem you can also request xml results from rpxnow.com. See https://rpxnow.com/docs for more about the RPX API.

翻译http://appengine-cookbook.appspot.com/recipe/accept-google-aol-yahoo-myspace-facebook-and-openid-logins/应该很容易(它提供了一个Python app引擎方式来实现它)进入app引擎Java,如果通过rpxnow.com就可以了。如果解析json是个问题,您也可以从rpxnow.com请求xml结果。有关RPX API的更多信息,请参见https://rpxnow.com/docs。

#3


For the openidjava libraries you would just include this in your project. If you are using Eclipse (it has a great plug-in for GWT and App Engine). Stick the openidjava files in your src directory or the jar in the WEB-INF/lib directory and make sure you add it to your classpath.

对于openidjava库,您只需在项目中包含它。如果您正在使用Eclipse(它有一个很好的插件用于GWT和App Engine)。将openidjava文件粘贴到src目录或WEB-INF / lib目录中的jar中,并确保将其添加到类路径中。

#4


Well, I know this is an old question, but I'm trying now to get openid4java running on App Engine and it is not working. It seems that it uses an "HTTPClient" library that wants to start a new thread and App Engine throws an exception because of that.

好吧,我知道这是一个老问题,但我现在正在尝试在App Engine上运行openid4java并且它无法运行。它似乎使用了一个想要启动新线程的“HTTPClient”库,因此App Engine会引发异常。

So, if you plan to use openid4java on App Engine, look before if there is a solution to this. I just can't find one :(

因此,如果您计划在App Engine上使用openid4java,请先查看是否有解决方案。我只是找不到一个:(

You can see the problem in more detail here and here.

您可以在此处和此处更详细地查看问题。

Hope it helps!

希望能帮助到你!