mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
c7d992f341
This ensures we are able to follow referrals for LDAP password modify operations when permit_referrals is true. Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
19 lines
637 B
Go
19 lines
637 B
Go
package authentication
|
|
|
|
import (
|
|
"github.com/go-ldap/ldap/v3"
|
|
)
|
|
|
|
// ProductionLDAPConnectionFactory the production implementation of an ldap connection factory.
|
|
type ProductionLDAPConnectionFactory struct{}
|
|
|
|
// NewProductionLDAPConnectionFactory create a concrete ldap connection factory.
|
|
func NewProductionLDAPConnectionFactory() *ProductionLDAPConnectionFactory {
|
|
return &ProductionLDAPConnectionFactory{}
|
|
}
|
|
|
|
// DialURL creates a connection from an LDAP URL when successful.
|
|
func (f *ProductionLDAPConnectionFactory) DialURL(addr string, opts ...ldap.DialOpt) (conn LDAPConnection, err error) {
|
|
return ldap.DialURL(addr, opts...)
|
|
}
|