How to get username and password to do custom auth

I am trying to implement a custom authentication for soanrqube for I want to get username and password of the user at the time of login, I looked at baseidentityprovider interface but it didn’t help.
Can someone point me to relevant interface which can help me.