Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Display message after user inactivity when Forms Auth ticket expires

$
0
0

I want to display a message to users like below, after 20 mins of inactivity.

"You have been logged out, please login again"

Specifically, for example, a user logs in, after 20 mins inactivity, s/he clicks any links on the page, s/he will be redirected to the Login page via the built-in FormAuthModule, and the message above will be displayed on the Login page.

Considerations

1) It is `forms auth` time out (The `Forms` element), not `session` time out (`SessionState` element)

2) Ideally, I don't want to change the built-in Form Auth's redirection logic, to use JavaScript.

3) Forms Auth module only modifies forms auth ticket after half of period. Please find relevant article below:

Quoted below:
"Forms auth tickets aren't actually updated until half of the time
goes by. So if you have timeouts set to an hour and send in one
request 25 minutes into it, the session is reset to an hour timeout,
the forms auth ticket isnt touched and expires in 35 minutes!"

http://stackoverflow.com/questions/7586469/how-can-i-handle-forms-authentication-timeout-exceptions-in-asp-net

Problems:

1) This is a legacy project, I want to minimise changes to existing code.

My Questions:

1) I cannot find out an event for Forms auth time out, below is for  authenticating the current request.
https://msdn.microsoft.com/en-us/library/467h1csc%28v=vs.140%29.aspx?f=255&MSPPError=-2147217396

2) What options I have to implement this?


Any idea


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>