SSO - who calls login()?

We have a landing page where the user enters his username/password. I want that page to pass the
user/password to me where I will skip the nextcloud login page.

I’m having trouble finding how Nextcloud passes the user/password. I think it eventually goes to
lib/private/User/Session.php, where login() calls loginWithPassword(). Who calls login() ?