ok, it seems that i don't need that code (but i would still appreciate to know where it is). I've read this post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090281#4090281
where nm-156 found the way to supress the need for IdentityLoginModule provided by portal.
I should be able to do everything without looking at the portal IdentityLoginModule code :)
Identity management changed significantly recently (was it in 2.6.3 or 2.6.4, I'm not sure), and was also removed from the main body of portal code and placed into its own module. In 2.6.4 you can find it in thirdparty/jboss-portal/module/identity. I count six *LoginModule classes there.
Portal Identity module:
(this is example location as I would need to track where the exact sources for jbosssx jar version consumed by portal are)
I forgot to mention that thirdparty is not populated until you do a build. Go the the build directory and run the build.bat or build.sh script.
thank you all, i found the module and the code i wanted.