[Seaside] How to define the duration of my sessions

Sabine Manaa manaa.sabine at gmail.com
Sun Jan 22 08:11:32 UTC 2017


Hi Petr,

concerning the redirect to the login page:

I do in my main Layout View Class:

renderSessionExpiryLoadScriptOn: html
„this is called in renderContentOn:“
html document
addLoadScript:
(html jQuery document
onAjaxStart: (html jQuery class: self cssClassSpinner) show;
onAjaxStop: (html jQuery class: self cssClassSpinner) hide;
onAjaxError: (self ajaxErrorHandler asFunction: #('event' 'jqxhr'
'settings' 'exception')))

ajaxErrorHandler
^ ' if (jqxhr.status == 403) {
            alert(„German text which means you are logged out. Aus
Sicherheitsgründen wurde Ihre Sitzung beendet. Bitte melden Sie sich neu
an.");
            window.location.href = settings.url.split("?")[0].
replace("help","");
        } else {
if (jqxhr.status == 200) { } else {
alert(„German Text which means sorry, error occured -
continuing..Entschuldigung, es ist ein Fehler aufgetreten. Bitte melden Sie
sich neu an und versuchen es erneut oder geben Sie uns eine Info über den
folgenden Fehler: " + exception +"jqxhr.status:"+jqxhr.status);
        }}'

I have this solution from the forum here. Yes, more/actual documentation
would help a lot…

Regards
Sabine

2017-01-21 16:30 GMT+01:00 Petr Fischer-2 [via Smalltalk] <
ml-node+s1294792n4930203h88 at n4.nabble.com>:

> > Hi Petr,
> >
> > I have already a solution for redirect to login page  and show message
> > after session was timed out in the browser.
>
> How are you doing this in Seaside 3.2, please? (Again, there is a
> documentation on the net + blog posts, but everything is obsolete).
>
> > I want to log in a file on the server each login and logoff of the
> users.
> > Login no problem, logoff with logoff button either.
> > But hose sessions which are not terminated by the user (not clicking on
> > "logout") would not be logged so far.
> >
> > For this reason I wanted to log them when their session was timed out
> (also
> > if the user does not come back and finds its session dead, e.g. if the
> user
> > simply closes the browser or shutdown the system).
> >
> > As far as I understand now after reading this post
> >  http://forum.world.st/Seaside-sessions-not-being-either-
> > unregistered-or-GCed-td4835659.html#a4835753
> >
> > this is not done immediately after my defined timeout e.g.
> > anApplication configuration at: #maximumRelativeAge put: 3600.
> >
> > and also not in >>unregistered
> >
> > but only when the garbage collection finds this session or so....
> >
> > So I don't have a solution for the "log-when-session-ended-without-logoff"
>
> > yet.
> >
> > Regards
> > Sabine
> >
> >
> >
> > 2017-01-21 12:57 GMT+01:00 Petr Fischer-2 [via Smalltalk] <
> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4930203&i=0>>:
>
> >
> > > What do you want to do when session timeouted? Something on the
> server, or
> > > on the web client (eg. show login page with proper message immediately
> > > after timeout)?
> > >
> > > pf
> > >
> > > > Hi Johan,
> > > >
> > > > my 2nd question was how to do something when the session is
> terminated.
> > > >
> > > > I am wondering that when trying your suggestion with >>unregistered,
> it
> > > is
> > > > called not when the session expires but more early.
> > > >
> > > > I found this:
> > > > http://forum.world.st/Seaside-sessions-not-being-either-
> > > unregistered-or-GCed-td4835659.html#a4835753
> > > >
> > > > I will look closer tomorrow, but perhaps you can confirm that it is
> not
> > > >>
> > > > unregistered
> > > >
> > > > Or do I understand it wrong?
> > > >
> > > > Regards
> > > > Sabine
> > > >
> > > > 2017-01-20 20:22 GMT+01:00 Sabine Manaa <[hidden email]
> > > <http:///user/SendEmail.jtp?type=node&node=4930183&i=0>>:
> > > >
> > > > > Hi Johan, hi Petr,
> > > > >
> > > > > thank you! I did not succeed today with Johans code and thought
> that I
> > > > > will continue tomorrow.
> > > > > With the hint of Petr (and Nicolai), it works now.
> > > > >
> > > > > I do something like:
> > > > >
> > > > > theApplication := WAAdmin register: RKALayoutView asApplicationAt:
> > > > > theApplicationName.
> > > > > theApplication cache: theApplication createCache
> > > > >
> > > > > Regards,
> > > > > sabine
> > > > >
> > > > > 2017-01-20 17:00 GMT+01:00 Petr Fischer-2 [via Smalltalk] <[hidden
> > > email]
> > > > > <http:///user/SendEmail.jtp?type=node&node=4930149&i=0>>:
> > > > >
> > > > >> http://stackoverflow.com/questions/41173162/how-to-configure
> > > > >> -seaside-3-2-session-timeouts-age
> > > > >>
> > > > >>
> > > > >> > Hi,
> > > > >> >
> > > > >> > how can I define the duration of my sessions?
> > > > >> >
> > > > >> > >>application cache expiryPolicy configuration at:
> #cacheTimeout
> > > put:
> > > > >> 120.
> > > > >> > does not work any longer (no implementor of #expiryPolicy)
> > > > >> >
> > > > >> > In the comment of  WASession there is the text "If the session
> has
> > > not
> > > > >> been
> > > > >> > used for #defaultTimeoutSeconds, it is garbage collected by the
> > > system.
> > > > >> "
> > > > >> > but there is no implementor of #defaultTimeoutSeconds.
> > > > >> >
> > > > >> > And 2nd question, is it possible to define a certain task to do
> > > from my
> > > > >> > session instance if the session is unregistered because of
> > > duration?
> > > > >> (e.g.
> > > > >> > write sth in a log file)
> > > > >> >
> > > > >> > (From the class comment also: WARegistry clearAllHandlers. does
> not
> > > > >> exist
> > > > >> > any more)
> > > > >> >
> > > > >> > Regards
> > > > >> > Sabine
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > --
> > > > >> > View this message in context: http://forum.world.st/How-to-d
> > > > >> efine-the-duration-of-my-sessions-tp4930014.html
> > > > >> > Sent from the Seaside General mailing list archive at
> Nabble.com.
> > > > >> > _______________________________________________
> > > > >> > seaside mailing list
> > > > >> > [hidden email] <http:///user/SendEmail.jtp?
> > > type=node&node=4930111&i=0>
> > > > >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/
> seaside
> > > > >> _______________________________________________
> > > > >> seaside mailing list
> > > > >> [hidden email] <http:///user/SendEmail.jtp?
> type=node&node=4930111&i=1>
> > >
> > > > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/
> seaside
> > > > >>
> > > > >>
> > > > >> ------------------------------
> > > > >> If you reply to this email, your message will be added to the
> > > discussion
> > > > >> below:
> > > > >> http://forum.world.st/How-to-define-the-duration-of-my-sessi
> > > > >> ons-tp4930014p4930111.html
> > > > >> To start a new topic under Seaside General, email [hidden email]
> > > > >> <http:///user/SendEmail.jtp?type=node&node=4930149&i=1>
> > > > >> To unsubscribe from Seaside, click here.
> > > > >> NAML
> > > > >> <http://forum.world.st/template/NamlServlet.jtp?
> > > macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&
> > > base=nabble.naml.namespaces.BasicNamespace-nabble.view.
> > > web.template.NabbleNamespace-nabble.view.web.template.
> > > NodeNamespace&breadcrumbs=notify_subscribers%21nabble%
> > > 3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_
> > > instant_email%21nabble%3Aemail.naml>
> > > > >>
> > > > >
> > > > >
> > > > > ------------------------------
> > > > > View this message in context: Re: How to define the duration of my
> > > > > sessions
> > > > > <http://forum.world.st/How-to-define-the-duration-of-my-
> > > sessions-tp4930014p4930149.html>
> > > > >
> > > > > Sent from the Seaside General mailing list archive
> > > > > <http://forum.world.st/Seaside-General-f86180.html> at
> Nabble.com.
> > > > >
> > > > > _______________________________________________
> > > > > seaside mailing list
> > > > > [hidden email] <http:///user/SendEmail.jtp?
> type=node&node=4930183&i=1>
> > > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> > > > >
> > > > >
> > >
> > > > _______________________________________________
> > > > seaside mailing list
> > > > [hidden email] <http:///user/SendEmail.jtp?
> type=node&node=4930183&i=2>
> > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> > >
> > > _______________________________________________
> > > seaside mailing list
> > > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4930183&i=3>
>
> > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> > >
> > >
> > > ------------------------------
> > > If you reply to this email, your message will be added to the
> discussion
> > > below:
> > > http://forum.world.st/How-to-define-the-duration-of-my-
> > > sessions-tp4930014p4930183.html
> > > To start a new topic under Seaside General, email
> > > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4930203&i=1>
> > > To unsubscribe from Seaside, click here
> > > <
> > > .
> > > NAML
> > > <http://forum.world.st/template/NamlServlet.jtp?
> macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&
> base=nabble.naml.namespaces.BasicNamespace-nabble.view.
> web.template.NabbleNamespace-nabble.view.web.template.
> NodeNamespace&breadcrumbs=notify_subscribers%21nabble%
> 3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_
> instant_email%21nabble%3Aemail.naml>
> > >
> >
> >
> >
> >
> > --
> > View this message in context: http://forum.world.st/How-to-
> define-the-duration-of-my-sessions-tp4930014p4930188.html
> > Sent from the Seaside General mailing list archive at Nabble.com.
>
> > _______________________________________________
> > seaside mailing list
> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4930203&i=2>
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4930203&i=3>
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/How-to-define-the-duration-of-my-
> sessions-tp4930014p4930203.html
> To start a new topic under Seaside General, email
> ml-node+s1294792n86180h75 at n4.nabble.com
> To unsubscribe from Seaside, click here
> <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1310907&code=bWFuYWEuc2FiaW5lQGdtYWlsLmNvbXwxMzEwOTA3fC0xOTE3OTcxOTg5>
> .
> NAML
> <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://forum.world.st/How-to-define-the-duration-of-my-sessions-tp4930014p4930243.html
Sent from the Seaside General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20170122/325210f1/attachment-0001.html>


More information about the seaside mailing list