[jboss-user] [Security & JAAS/JBoss] - Re: logout from swing client

ragavgomatam do-not-reply at jboss.com
Fri Jan 25 14:58:58 EST 2008


I think you can..Try this ( we did this in our swing client) ....In your swing client you must be having a handle to your callback handler, LoginContext & your implementation of PrivilgedAction

CallBackHandler cbh = new FooCallBackHandler(); 
  | LoginContext lc = new LoginContext("FooRealm", cbh); 
  | lc.login(); 
  | Subject userSubject = lc.getSubject(); 
  | // do your secured stuff here
  | userSubject.doAsPrivileged(PrivilegedAction action, AccessControlContext acc);
  | // done with my stuff, so i am loggin out
  | lc.logout() 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123654#4123654

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123654



More information about the jboss-user mailing list