How do I implement an OpenID consumer in my Google App Engine project?

爱⌒轻易说出口 提交于 2019-12-03 15:46:52

问题


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

I have looked at openid4java and 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.

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.

Any pointers?


回答1:


http://code.google.com/p/dyuproject/




回答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.




回答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.




回答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.

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 :(

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

Hope it helps!



来源:https://stackoverflow.com/questions/814622/how-do-i-implement-an-openid-consumer-in-my-google-app-engine-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!