XF 1.5 How to add custom authentication module?

I have written a custom authentication module, but I am not sure how Xenforo loads authentication module. Apparently, adding a new scheme_class in the xf_user_authenticate table (for example "XenForo_Authentication_Discuz") and placing a Discuz.php file into the authentication folder does not work? I can't find any documentation on authentication module. Really appreciate your help!

Edit: Sorry turns out it just works this way. It's my coding error. Sorry about this.
Last edited: