OpenID for Google App Engine

2019-02-06 22:56发布

问题:

I saw many links over the internet and specifically openid-consumer project (which is a part of http://code.google.com/p/google-app-engine-samples/), but it doesn't work as honestly readme file says.

So what's the latest update on that? Is there any way I can authenticate my web site users with OpenID from someone besides Google (like stackoverflow does)?

回答1:

I have setup an example app here:

http://github.com/shripadk/authlogic_openid_selector_example

With the source code. It works exactly the way stackoverflow does. Have not implemented facebook auth as its buggy still.



回答2:

I've just played a bit with the openid-consumer you mention and it actually works. Have you tried to run the sample code standalone, as a separate project?

I've used it in a test application on App Engine and it seems to work alright. I placed the consumer.py, fetcher.py, store.py and then the openid dir in the root dir, then I moved parts of the config in app.yaml from the openid sample app to my app.yaml.

You can check the implementation at http://x-libris.appspot.com. In the upper right corner press Logga in (which is swedish for login). Try using any of the available OpenId providers, so far OpenId, Google, MySpace and Yahoo! are available (I've only tested the first two providers).

It's an Ajax based solution so I did some tweaking of the render method in consumer.py in order to change the templating and the example at openid-demo.appspot.com was handy.

// John



回答3:

I just noticed the new version of the app engine SDK now includes support for OpenID in the user API

The 1.3.4 release includes support for authentication via OpenID as an experimental feature.

look in the app engine python user API docs for more info about this

This should make this easy to implement (I will start implementing this today !)



回答4:

try rpxnow.com , they provide multiple options including openid.