Hi,
You might consider instead using the app.yaml configuration login: required
for URLs that require login. See our docs:
http://code.google.com/appengine/docs/configuringanapp.html
-Marzia
On Tue, Sep 23, 2008 at 8:46 AM, Ethan <[EMAIL PROTECTED]> wrote:
>
> I plan on using below to protect access to classes that require login.
> Any obvious problems?
>
> example:
>
> class SomeUrl(webapp.RequestHandler):
> def get(self):
> if GoogleLogin(self, '/SomeUrl'):
> ...
>
> #
>
> ------------------------------------------------------------------------------
> # GoogleLogin
> #
>
> ------------------------------------------------------------------------------
> def GoogleLogin (self, l_url):
>
> r = False
>
> user = users.get_current_user()
>
> if user:
> r = True
> else:
> path = os.path.join(os.path.dirname(__file__),
> 'Authenticate.html')
>
> template_values = {
> 'u': users.create_login_url(l_url)
> }
>
> self.response.out.write(template.render(path, template_values))
>
> return r
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---