Originally posted by Ulf Dittmer:
[QB]Yes, extending JDBCRealm is the way to go. It in turn inherits setDigest and setDigestEncoding methods from RealmBase that you can use to plug in whatever digest implementation you prefer.
Thanks for pointing that out. I'm still trying to understand the Realm framework, and the sequence in which the framework methods are invoked by the Container. Are you able to clarify this for me?
For example, what order are the authenticate(), setDigest(), setDigestEncoding(), and getPassword() methods invoked? I'm not really sure which of these I need to override.
Basically all I need to do is to intercept the cleartext password and pass it to my password encryption class. It has a checkPassword() method that will take the cleartext, and then encrypt it, and compare it to the encrypted version stored in the database.
So, I don't need my custom JDBCRealm to do any encryption, it will just delegate authentication to existing code.
In my server.xml file, I'd like to specify a custom MD5 digest name that my JDBCRealm class will check for before passing it off to my authentication class.
I hope that made sense!