Right now I inherited legacy application to support and I found a very strange thing. The application is Vaadin based app and it is hosted on JBoss EAP 5.1. On JBoss there is configured login-config module - org.jboss.security.auth.spi.LdapExtLoginModule
. This module works fine and does its job. What would I like to do is how to get access to JBossGenericProncipal which is created by this login module? When I debug app and check session (StandardSessionFacade) I can see that it has a field principal but it is private and there is no way to access this principal.
Do you know how to retrieve this Principal? :)
Thanks in advance!
Kamil
If you are referring to the class
org.jboss.web.tomcat.security.JBossGenericPrincipal
you can call the methodgetCallerPrincipal()
that returns ajava.security.Principal
Here's a reference from docjar: http://www.docjar.com/docs/api/org/jboss/web/tomcat/security/JBossGenericPrincipal.html.
There's also a
org.jboss.as.web.security.JBossGenericPrincipal
class, but is not available on JBoss EAP 5.You can also retrieve the java.security.Principal calling the method
getUserPrincipal()
fromHttpServletRequest