-
1. Re: Invoke Logout - Custom Loginmodule
windigo Aug 8, 2011 9:02 AM (in response to windigo)I think the author of this thread had the same question like me, but didn't got an answer
Please help me.
-
2. Re: Invoke Logout - Custom Loginmodule
jaikiran Aug 8, 2011 10:18 AM (in response to windigo)How is the server side MyLoginModule (i.e. com.MyLoginModule) being used? Is that security domain configured in some jboss-web.xml or jboss.xml?
-
3. Re: Invoke Logout - Custom Loginmodule
windigo Aug 8, 2011 10:38 AM (in response to jaikiran)Its an EAR-application and configured in a jboss-app.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD Java EE Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd"> <jboss-app> <security-domain>java:/jaas/MySecurityDomain</security-domain> </jboss-app>
and to complete the picture... The loginmodule is integrated in the ear as a sar-module. My application.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6"> <display-name>Test</display-name> <module> <ejb>TestEjb.jar</ejb> </module> <module> <connector>MyLoginModule.sar</connector> </module> </application>
-
4. Re: Invoke Logout - Custom Loginmodule
windigo Aug 9, 2011 4:57 AM (in response to windigo)I think the problem is related to this issue - even if that issue is marked as resolved
-
5. Re: Invoke Logout - Custom Loginmodule
windigo Aug 10, 2011 7:31 AM (in response to windigo)I've found a workaround which is not perfect. On client side you can invoke the method flushAuthenticationCache(String, Principal) on the MXBean jboss.security:JaasSecurityManager. This way you can force the server to remove LoginContext for the specific user.
The problem is when the same user logs in twice. When he logs off in one of both sessions, then the other is invalid too.