This authentication module attempts to authorize and authenticate a user against an LDAP server. Like most LDAP authentication systems, this module does this in two steps. First, it queries the LDAP server using a Bind DN and searches for the user that is attempting to sign in. If the user is found, the module attempts to bind to the server using the user's supplied credentials. If this succeeds, the user has been authenticated, and his account information is retrieved and passed to the Gogs login infrastructure.
To use this module, add an LDAP authentication source via the Authentications section in the admin panel. The fields should be set as follows:
Authorization Name (required)
Host (required)
Port (required)
Enable TLS Encryption (optional)
Bind DN (optional)
Bind Password (optional)
User Search Base (required)
User Filter (required)
First name attribute (optional)
Surname name attribute (optional) *The attribute of the user's LDAP record containing the user's surname This will be used to populate their account information.
E-mail attribute (required) The attribute of the user's LDAP record containing the user's email address. This will be used to populate their account information.