[Building Sakai] Avoid session expiration via restful

Francisco francisco.saez.sakai at gmail.com
Fri Feb 8 00:42:04 PST 2013


Hi Charles,

thanks for the answer.

We are developing a sakai interface for android devices, and I don't 
want to load the HTML (for the momento we are not using any browser). 
The problem is, for now, I can not keep the session alive. Looking the 
method poll_session_data(), I've seen something about "auto" equals to 
true or false. But it don't work in any way. I also tried other restful 
calls (like get sites list), but session always expire.

Maybe that's because we are using directly java HttpURLConnections, 
without any browser?

So, in terms of efficency, what's the best option: modify the session 
restful method to refresh it or call the portal URL as neoscripts.js does?

Thanks again.
Cheers,
Francisco.

El 07/02/2013 17:05, Charles Severance escribió:
> Francisco,
>
> If you look at:
>
> https://source.sakaiproject.org/svn/portal/trunk/portal-charon/charon/src/webapp/scripts/neoscripts.js
>
> You will see how the portal handles this.
>
> Look for  poll_session_data() and keep_session_alive()
>
> The /direct/session specifically does not reset last access because it 
> is the way to read last access to most accurately set the timeout 
> dialog box.
>
> In keep_session_alive() - it just uses jQuery to do an in-browser get 
> of the /portal URL and discards the results.  It extends the session. 
>  It might seem heavy - but the code uses /direct/session to make sure 
> it only happens when the timer is really expiring.
>
> /Chuck
>
> On Feb 7, 2013, at 10:22 AM, Francisco wrote:
>
>> Hi all,
>>
>> there is any way to refresh sakai session via restful to avoid it to 
>> expire? Because we have detected that calling 
>> ".../direct/session.json?sakai.session=xxx" does not update 
>> "lastAccessedTime" property.
>>
>> I know that I can modify entitybroker to do that, but I prefer to 
>> confirm there is no more options. Maybe have you think something 
>> similar for the restful new features???
>>
>> Thanks and regards.
>> Francisco
>> -- 
>>
>> <image002.jpg><http://www.samoo.es/>
>>
>> <http://www.samoo.es/>
>>
>> *Francisco Sáez*
>>
>> *Analista - Programador*
>>
>> francisco.saez at samoo.es <mailto:francisco.saez at samoo.es>
>>
>> +34 - 673 80 32 69
>>
>> www.samoo.es <http://www.samoo.es/>
>>
>> Este  correo  y sus archivos asociados son privados y confidenciales 
>> y va dirigido  exclusivamente  a su destinatario. Si recibe este 
>> correo sin ser el destinatario del mismo, le rogamos proceda a su 
>> eliminación y lo ponga en  conocimiento del emisor. La difusión por 
>> cualquier medio del contenido de  este  correo podría ser sancionada 
>> conforme a lo previsto en las leyes españolas, Ley Orgánica 15/1999 
>> de Protección de Datos de Carácter Personal.  No  se autoriza la 
>> utilización con fines comerciales o para su incorporación a ficheros 
>> automatizados de las direcciones del emisor o del destinatario.”
>>
>> This mail and its attached files are confidential and are only and 
>> exclusively intended to their addressee. In case you may receive this 
>> mail not being its addressee, we beg you to let us know the error by 
>> reply and to proceed to destroy it. The circulation by any mean of 
>> this mail could be penalised in accordance with the Spanish 
>> legislation. Is not allowed the use of both, the transmitter and the 
>> addressee’s, address with a commercial aim, or in order to be 
>> incorporated to automated data process or to any kind of files.
>>
>> P Antes de imprimir este correo electrónico piense bien si es 
>> necesario hacerlo. El medioambiente es cosa de todos.
>>
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org 
>> <mailto:sakai-dev at collab.sakaiproject.org>
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to 
>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of 
>> "unsubscribe"
>


-- 

Samoo LOGO<http://www.samoo.es/>

<http://www.samoo.es/>

*Francisco Sáez*

*Analista - Programador*

francisco.saez at samoo.es <mailto:francisco.saez at samoo.es>

+34 - 673 80 32 69

www.samoo.es <http://www.samoo.es>

Este  correo  y  sus archivos asociados son privados y confidenciales y 
va dirigido exclusivamente  a su destinatario. Si recibe este correo sin 
ser el destinatario del mismo, le rogamos proceda a su eliminación y lo 
ponga en conocimiento del emisor. La difusión por cualquier medio del 
contenido de este  correo podría ser sancionada conforme a lo previsto 
en las leyes españolas, Ley Orgánica 15/1999 de Protección de Datos de 
Carácter Personal.  No  se autoriza la utilización con fines comerciales 
o para su incorporación a ficheros automatizados de las direcciones del 
emisor o del destinatario.”

This mail and its attached files are confidential and are only and 
exclusively intended to their addressee. In case you may receive this 
mail not being its addressee, we beg you to let us know the error by 
reply and to proceed to destroy it. The circulation by any mean of this 
mail could be penalised in accordance with the Spanish legislation. Is 
not allowed the use of both, the transmitter and the addressee’s, 
address with a commercial aim, or in order to be incorporated to 
automated data process or to any kind of files.

P Antes de imprimir este correo electrónico piense bien si es necesario 
hacerlo. El medioambiente es cosa de todos.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130208/2cc77cac/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 3022 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130208/2cc77cac/attachment.jpg 


More information about the sakai-dev mailing list