session-timeout

Ruby on rails - Authlogic : periodically check if user session is valid

旧城冷巷雨未停 提交于 2019-12-30 09:32:14
问题 I'm looking for a solution allowing me to check periodically if the user session has expired and if so redirect him to the login page. I'm using Authlogic gem, so what I'm doing is call a function that make a test on current_user. My USER_SESSION_TIMEOUT is 5minutes so I make this ajax call every 5:10 minutes. <%= periodically_call_remote :url => {:controller => 'user_session', :action => 'check_session_timed_out'}, :frequency => (USER_SESSION_TIMEOUT + 10.seconds) %> def check_session_timed

Ruby on rails - Authlogic : periodically check if user session is valid

两盒软妹~` 提交于 2019-12-30 09:32:10
问题 I'm looking for a solution allowing me to check periodically if the user session has expired and if so redirect him to the login page. I'm using Authlogic gem, so what I'm doing is call a function that make a test on current_user. My USER_SESSION_TIMEOUT is 5minutes so I make this ajax call every 5:10 minutes. <%= periodically_call_remote :url => {:controller => 'user_session', :action => 'check_session_timed_out'}, :frequency => (USER_SESSION_TIMEOUT + 10.seconds) %> def check_session_timed

handle session expired event in spring based web application

你说的曾经没有我的故事 提交于 2019-12-29 06:36:45
问题 I am using Spring security feature in my application, but I found out that when the session expired, all the request ajax return the page login.jsp(not redirect, in http response, it puts all the html content) which is the login page of my webapp. I used a lot of ajax request in my app and the goal is return certain error code like 510 instead of the login page. <session-management session-authentication-strategy-ref="example" /> without invalid-session-url I tried to make invalid-session-url

session variables timeout in asp.net app

♀尐吖头ヾ 提交于 2019-12-29 04:54:35
问题 In my web app I'm using some session variables, which are set when I login: e.g. Session("user_id") = reader("user_id") I use this through my app. When the session variable times out, this throws errors mainly when connecting to the database as session("user_id") is required for some queries. How can I set my session variables so that once they are timed out to go to the login page or how can at least increase the length of time the are available? 回答1: I'm guessing you're using Forms

Preventing session timeout during long processing time in JSF

陌路散爱 提交于 2019-12-28 11:58:48
问题 I've been working on an JSF application. At one place, I've to call an action in managed bean. The action actually process hundreds of records and the session timesout before the processing is finished. Though all the records are processed successfully, the session expires and the user is sent to login page. I'd tried adding session.setMaxInactiveInterval(0); before the processing of the records with no effect. How to prevent the session time out during such process. 回答1: Introduce ajaxical

Prevent session expired in PHP Session for inactive user

元气小坏坏 提交于 2019-12-28 05:22:27
问题 I have a problem with my application: my application has many forms and need about 1 hour to finish this form because the form is dynamic (can add other forms). The problem is: the session of my web server is 24 minutes. When user fill the form, they spent so much time and the session timed out because server recognize that the user is inactive. It's very annoying when form submitted, most data was lost and the user is returned to the login page. I have tried to make my session expired in 10

Display warning after X time of inactivity and logout after X+Y time javascript

梦想的初衷 提交于 2019-12-25 16:52:49
问题 I have seen many answers similar to this question.None helped me resolving this. Issue - I want to display a warning message after 5 minutes of inactivity,If the user is still inactive post 5 minutes of warning, Page should automatically redirect to logoff.jsp. I dont want to use Jquery here.It has to be done using Javascript only. Help!! var IDLE_TIMEOUT = 15; //seconds var _idleSecondsCounter = 0; document.onkeypress = function() { _idleSecondsCounter = 0; }; document.onclick = function() {

IceFaces Session Expiry causes an exception

99封情书 提交于 2019-12-25 08:48:36
问题 My IceFaces application crashes on session expiry. It's not showing the "User Session Expired" or "Network Connection Interrupted" message. My guess is the same page is loaded again, and since the backing bean code cannot find the session variables, it throws the following exception: exception javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: Problem in renderResponse: /main-template.jspx: User session has expired or it was invalidated. root cause java.lang

how to extend session timed out with jquery ajax

坚强是说给别人听的谎言 提交于 2019-12-24 14:04:53
问题 I have a web page with a editable jquery grid on it. I am using it with asp.net web form. The web form authentication is set to timeout after 20 minutes. Sometimes, users need to update large number of data on the grid and once they click Save, the website often already timeout and user loses the data. I am wondering whilst user is still active on the grid, can we trigger something in javascript to prevent web form authentication timeout and server sessions timeout? Thanks 回答1: check the link

How to implement timeout in asyncio server?

旧城冷巷雨未停 提交于 2019-12-24 06:49:39
问题 Below is a simple echo server. But if the client does not send anything for 10 seconds, I want to close the connection. import asyncio async def process(reader: asyncio.StreamReader, writer: asyncio.StreamWriter): print("awaiting for data") line = await reader.readline() print(f"received {line}") writer.write(line) print(f"sent {line}") await writer.drain() print(f"Drained") async def timeout(task: asyncio.Task, duration): print("timeout started") await asyncio.sleep(duration) print("client