Here is a description of an (OpenID + GAE Utilities) implementation we use: http://wp.me/poqXr-5a
Hopefully it answers the question. If you use it, please cite the source. Feedback -- positive or negative -- gratefully accepted. On Jan 27, 2:31 pm, lucrussell <[email protected]> wrote: > Hi Martin, > > I'm working on something similar at the moment. It is a bit difficult > to find information; the best reference I have found so far is the > DemandID application(http://demand.openid.net/). You can get the > source for it from the SVN server (http://demand.googlecode.com/svn/ > trunk). This application uses its own simple session implementation, > but you could replace it with something like GAE Utiltities. > > Hope this helps. > > Luc > > On Jan 27, 5:56 pm, spider100 <[email protected]> wrote: > > > > > Ive spent days searching the web and im drawing a blank. I simply want > > to integrate RPX (janrain) into Appengine - lods of code for the > > script inserts and the return of the openid token - thats all great - > > but other than that no-one seems to take it any further as in actually > > create an openid login that works - why? i assume no session > > management? > > > Here is a simple class handler that gets the TOKEN for the open id and > > then makes a fetch to grab the users profile. All very simple using > > RPX. > > > class RPXHandler(webapp.RequestHandler): > > def get(self): > > token = self.request.get('token') > > url = 'https://rpxnow.com/api/v2/auth_info' > > args = { > > 'format': 'json', > > 'apiKey': '#YOUR KEY#', > > 'token': token > > } > > r = urlfetch.fetch(url=url, > > payload=urllib.urlencode(args), > > method=urlfetch.POST, > > headers={'Content-Type':'application/x-www-form- > > urlencoded'} > > ) > > json = simplejson.loads(r.content) > > > logging.info(json) > > > if json['stat'] == 'ok': > > unique_identifier = json['profile']['identifier'] > > nickname = json['profile']['preferredUsername'] > > email = json['profile']['email'] > > > # log the user in using the unique_identifier > > # this should your cookies or session you already have > > implemented > > > self.redirect('static/loggedin.html') > > else: > > self.redirect('static/error.html') > > > Now # here is where the problem starts - ideally we could be lazy and > > just log them into Google accounts - but their is no method to log a > > user in ie; > > > user.login(email) > > > so that abandons any hope of using google accounts - and to fair if we > > have open id - why bother! > > > SO... > > > Next easy route - sessions - but in webapp appengine their are none - > > > Can anyone HAS anyone made this work - need some method of protecting > > each page - ie Login=true > > A method to log out > > A method to get user credentials > > > Basically a simple user system using RPX/Openid - Dont need register > > or passwords - just a user system that auths through RPX/Openid and > > stored the data on app engine etc > > > I hope this make sense? > > > Martin -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
