Hi, When signing up for an application, you need to set your authentication for that app to your Google Apps domain: http://code.google.com/appengine/articles/auth.html
To have your users login, you can do one of two things. First, you can set up a handler in your app.yaml to require login. This will automatically direct users to login to the page, and redirect them there after login ( http://code.google.com/appengine/docs/configuringanapp.html#Requiring_Login_or_Administrator_Status ). You can also generate a login/logout URL for your users and render the link on the page HTML. When your users click on the link, they will be directed to the sign in page, and then redirected to the URL specified when the link is constructed (http://code.google.com/appengine/docs/users/loginurls.html). -Marzia On Tue, Dec 23, 2008 at 1:44 AM, troubleMaker <[email protected]> wrote: > > 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 -~----------~----~----~----~------~----~------~--~---
