What is openfire login flow

I have impl a new AuthProvider named CASAuthProvider which to impl SSO.

I thind openfire will invoke CASAuthProvider.authenticate(String , String ) or CASAuthProvider.authenticate(String , String , String ) method,

I debug it , and find it do not work follow my thought.

Why? And how openfire authenticate users,in which class,which method.

What is function of AuthProvider.authenticate?

Thanks.