I would like to create (implement by my own) authentication mechanism which will be plugged into my Java EE application.
As far as I know I have to implement LoginModule and connect this implementation with container mechanisms somehow. But the problem is that I don't know how to do it. Maybe You know where I can find sample code or tutorial about it?
In other words I would like to force container to call my classes whenever methods: authenticate, login, and logout are called.
Sample implementation: HttpServletRequest.login method will successfully authenticate only users with even numer of letters in login.