When to use AbstractServerLoginModule and UsernamePasswordLoginModule
Subclassing Login Modules The choice of sub-classing the AbstractServerLoginModule versus UsernamePasswordLoginModule is simply based on whether a string-based user name and credentials are usable for the authentication technology you are writing the login module for. If the string-based semantic is valid, then subclass UsernamePasswordLoginModule, otherwise subclass AbstractServerLoginModule.