Some more info: I looked in jboss administration console in profile -> security -> security domains -> bean-sec-domain (that's my domain). There is MyCustomLogin in login modules list. Both in 7.2 and 7.1
Still can't make it work in 7.1
You might try to make a module out of the jar containing your LoginModule code (add it to the JBOSS_HOME modules folder under a suitable path, ending in a folder named "main", containing your jar and a module.xml -- see the JBoss Documentation for details).
Then in JBOSS_HOME/modules/org/jboss/as/security/main/module.xml add <module name="some.path.to.MyCustomLogin"/> to the dependencies tag. Then the security subsystem should be able to load your class.
Thanks for reply.
My custom login was already properly packaged as a module (in modules/custom_module/main with custom_module.jar and module.xml).
Added as dependency to "modules/org/jboss/as/security/main/module.xml". Unfortunately that didn't help. Module is not even loaded.
There were at least a couple of bugs which we fixed in this area after 7.1.1 was released. The fact that it works on the latest nightly build is a good sign. If you don't want to use a snapshot and instead build from a tag which contains this fix, then you can get it from here https://github.com/jbossas/jboss-as/tree/7.1.3.Final
Thanks for info! I believed, that I did something wrong, but now everything got clear.