anonymous wrote : My application use DatabaseLoginModule and JAAS.
| I write a login form (standalone application) to client can enter userName and
passWord. And after client login successful, he can call some methods on beans. My mind is
if he login successful, and he do nothing and 10 minutes later, he will logout
automatically (same as window system).
|
As far as i know, there's no timeout value that you can specify. However, you can
implement your own custom logic for this. May be on the following lines:
- Whenever a bean method is called, save the current time (maybe) to a table in database.
- Have a timer/scheduled task which regularly checks for the table to see how long the
user has been inactive (comparing it against the timeout value).
- If you find that there was no activity then call the logout method on the LoginContext
as follows:
LoginContext lc = new LoginContext("client");
| lc.logout();
Note, that this is just one of the possible approaches i can think of. There might be
better options too, depending on the specifics of your application.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091829#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...