See the image from TryHackMe below for how authentication works with a service that supports LDAP.