Hello,

how do I use the logout using the realm-name from the web.xml. 

I wrote a custom LoginModul and registered this in the login-config.xml within 
JBOSS/server/default/conf.

Then I added an entry in the web.xml to configure my webapplication for JAAS 
Security. I also added a jboss-web.xml file with the necessary entry. 

The login as well as the EJB Security works fine!!! The problem arises if I 
want to log the user out. My first solution was to add a method logout() to the 
principal which is accessible in the whole web application. The logout method 
does the following:

public void logout() throws LoginException {
  LoginContext loginContext = 
    new LoginContext("XYModul", 
       new UsernameCallbackHandler(getName(), password));
  loginContext.logout();
}

The problem is, that I do not want to hardcode the String for the login module. 
It should be derived from the web.xml of the current web application.

I didn't found out how I could retrieve the realm-name from the web.xml. 

Can anyone help me?

Thanks 
Rene

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

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


-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to