Proper way of "logging out"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Proper way of "logging out"

Esteban A. Maringolo
I implemented the workflow of my app as WATask (SessionTask) installed
in /app which basically does the following:

go
| login |
login := self call: LoginComponent new.
login isValid ifTrue: [self call: MainComponent new].
self session unregister.

then in MainComponent I implemented a #logout method which basically does:

logout
^self answer

This way I get the session termination (if the user goes back and
performs an action it will be redirected to a blank session).

The problem is the last unregister in WATask redirects the user to the
root of the server.
If I unregister the session in the #logout method the result is the same.

In the past I'd implement this by means of an #isolate: call to my
,ain component, but how I'm supposed to do this now?

Regards,

Esteban A. Maringolo
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Proper way of "logging out"

sebastianconcept@gmail.co
do you really need to use a WATask kind of thing?

Why not regular components?



On Dec 14, 2013, at 1:34 PM, Esteban A. Maringolo <[hidden email]> wrote:

> I implemented the workflow of my app as WATask (SessionTask) installed
> in /app which basically does the following:
>
> go
> | login |
> login := self call: LoginComponent new.
> login isValid ifTrue: [self call: MainComponent new].
> self session unregister.
>
> then in MainComponent I implemented a #logout method which basically does:
>
> logout
> ^self answer
>
> This way I get the session termination (if the user goes back and
> performs an action it will be redirected to a blank session).
>
> The problem is the last unregister in WATask redirects the user to the
> root of the server.
> If I unregister the session in the #logout method the result is the same.
>
> In the past I'd implement this by means of an #isolate: call to my
> ,ain component, but how I'm supposed to do this now?
>
> Regards,
>
> Esteban A. Maringolo
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
tty
Reply | Threaded
Open this post in threaded view
|

Re: Proper way of "logging out"

tty
In reply to this post by Esteban A. Maringolo
In my rootTask logout I do:

    self session
           ....
            logout.

And in the logout method of my session class, I do some cleanup and a redirect:


    self redirectTo:"the URL of my site".



---- On Sat, 14 Dec 2013 07:34:05 -0800 Esteban A. Maringolo<[hidden email]> wrote ----

I implemented the workflow of my app as WATask (SessionTask) installed
in /app which basically does the following:

go
| login |
login := self call: LoginComponent new.
login isValid ifTrue: [self call: MainComponent new].
self session unregister.

then in MainComponent I implemented a #logout method which basically does:

logout
^self answer

This way I get the session termination (if the user goes back and
performs an action it will be redirected to a blank session).

The problem is the last unregister in WATask redirects the user to the
root of the server.
If I unregister the session in the #logout method the result is the same.

In the past I'd implement this by means of an #isolate: call to my
,ain component, but how I'm supposed to do this now?

Regards,

Esteban A. Maringolo
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Proper way of "logging out"

Stephan Eggermont-3
In reply to this post by Esteban A. Maringolo
You might want to take a look at how we handle that in StoryBoard.

http://ss3.gemstone.com/ss/StoryBoard.html/Wiki

That is very similar to what we do in  QCMagritte, but there we don't
have sample code.

Stephan
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside