I’ve registered my domain in Google Apps. I need to do an
authorization for registered users on my site. I mean users like
[email protected] , not [email protected]. I found some manuals, and did
something like:
import wsgiref.handlers
from google.appengine.api import users
from google.appengine.ext import webapp
import cgi
class MainPage(webapp.RequestHandler):
def get(self):
self.response.out.write("""
<html>
<body>
<form action="https://www.google.com/accounts/ClientLogin"
method="post">
<div>service <input type=text name="service" value=
"apps" ></div>
<div>accountType <input type=text name="accountType"
value= "HOSTED" ></div>
<div>email <input type=text name="Email" size=40></div>
<div>pass <input type=password name="Passwd" rows="1"
cols="40"></textarea></div>
<div><input type="submit" value="get token"></div>
</form>
</body>
</html>""")
def main():
application = webapp.WSGIApplication(
[('/', MainPage)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == "__main__":
main()
It works, but I understand, this is wrong. I’m not good in python. I
don’t understand how I can correctly send a post request for
authorization. Then I need to get token and process it on my page. I
mean, I don’t need a redirect to https://www.google.com/accounts/ClientLogin.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---