Skip to content

Instantly share code, notes, and snippets.

@magmastonealex
Created December 11, 2013 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magmastonealex/7904572 to your computer and use it in GitHub Desktop.
Save magmastonealex/7904572 to your computer and use it in GitHub Desktop.
from openid.store import filestore
from openid.consumer import consumer
from lib.persistDict import saveDict
import web
class openid_begin:
def GET(self):
s = {}
#web.config.db_parameters = {'dbn' : 'sqlite','db' : 'web.db'}
oidconsumer = consumer.Consumer(s, filestore.FileOpenIDStore("nonce"))
request = oidconsumer.begin("https://www.google.com/accounts/o8/id")
url = request.redirectURL(web.ctx.homedomain, web.ctx.homedomain+"/openid_fin")
saveDict(s)
web.found(url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment