How is a customer authenticated?

The login form’s block:

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/view/frontend/layout/customer_account_login.xml#L13-L15

The login form’s template with the «Sign In» button highlighted:

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/view/frontend/templates/form/login.phtml#L46-L46

The login form’s action value (the URL where the form’s data will be sent):
https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/view/frontend/templates/form/login.phtml#L25-L25

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Block/Form/Login.php#L57-L65

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Model/Url.php#L117-L131

The server handles the data sent with the controller:

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Controller/Account/LoginPost.php#L98-L104

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Controller/Account/LoginPost.php#L114-L114

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Controller/Account/LoginPost.php#L117-L117

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Model/AccountManagement.php#L415-L415

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Model/AccountManagement.php#L422-L422

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Helper/AccountManagement.php#L148-L156

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Helper/AccountManagement.php#L158-L158


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Model/CustomerRegistry.php#L139-L146

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Model/CustomerRegistry.php#L148-L164


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Helper/AccountManagement.php#L159-L159

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Helper/AccountManagement.php#L160-L160

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L176-L179


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L184-L184

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L186-L186


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L211-L217


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L62-L65

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L219-L221


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L75-L82

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L27-L30


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L223-L223

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L188-L190


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L242-L248

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L42-L42


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L234-L240

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L41-L41


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L116-L116


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Encryptor.php#L192-L195


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Encryption/Helper/Security.php#L18-L26


See also: