Hi Paul,
after multiple trials I found a way which is working:
1) as link I'm using now /logout
2) the following handler is answering to it (typical stuff in app.yaml
and wsgi application)
class LogoutHelper(webapp.RequestHandler):
def get(self):
usr = users.get_current_user()
if not usr:
self.redirect("/")
return
# HERE I'M DOING THE CLEANUP STUFF
url = users.create_logout_url("/")
self.redirect(url)
Thanks for the hints!
Kind Regards
Oliver W-D
On 4 Mrz., 15:31, Paul Roy <[email protected]> wrote:
> yep well turns out this is exactly what im doing. but i dont see this
> as "generating a blank page". i have to try out the code i suggested
> yesterday.
>
> and i did make it home, thx :)
>
> Sent from my iPhone
>
> On 09-03-04, at 01:28, OliWeiD <[email protected]>
> wrote:
>
>
>
> > Well, I've got the idea.
>
> > But I put the logout-uri into the html sitting on the page.
> > With your idea in mind, don't I need a blank page,
> > doing the del session stuff and then logout, passing the correct
> > logout uri
> > as an argument to that blank page??
>
> > Now I have to go to the train, hopefully you get, where you want to
> > go.
>
> > Oliver W.D.
>
> > On 4 Mrz., 06:26, Paul Roy <[email protected]> wrote:
> >> perhaps, instead of using the users' method directly, create a logout
> >> handler where you perform the necessary operations before fowarding
> >> to
> >> the logout uri.
>
> >> the tricky part is keeping track of the original uri. the way i do
> >> it,
> >> is to pass it as a request argument. you could maybe subclass the
> >> request handler, with a logout method. such as:
>
> >> def logout(self, uri=None):
> >> <check that there really is a user logged in
>
> >> if uri is None: uri = self.request.uri #not sure this part
> >> works..
>
> >> <del session and stuff..>
>
> >> self.redirect(user.logout(uri))
>
> >> ..
>
> >> im not 100% sure about this since im just typing this on my phone
> >> 50ft
> >> underground in a speeding subway train with nothing to refer to, but
> >> you should get the idea.
>
> >> when i get home ill see what code i use exactly.. ;)
>
> >> ps i actually just missed my stop! lol.. damn you google!! (shakes
> >> fist)
>
> >> Sent from my iPhone
>
> >> On 09-03-04, at 00:01, OliWeiD <[email protected]>
> >> wrote:
>
> >>> Hi everybody,
>
> >>> due to security reasons and for efficiency some sort of logout
> >>> handler
> >>> is needed.
> >>> That means, when the user is clicking on the created logout link
> >>> (users.create_logout_url)
> >>> During that logout I want to delete a session cookie and delete the
> >>> memcache entries for that user.
>
> >>> Any idea?
> >>> Kind Regards
> >>> Oliver W-D.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---