Password hash algorithm

I am able to read the source once I find it. I went looking through the source - for user.password - and I concentrated mainly on
the user_controller. Nothing jumped out at me. I’d appreciate any pointers on where to look.

What would work for me for is to be able to validate a user / password through discourse without adding in a sso signin / login. Maybe through the api or a direct call to some ruby code.