-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(authentication): ldap connection pooling
This implements optional LDAP connection pooling to optimize the speed of LDAP transactions. Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
- Loading branch information
1 parent
98970a2
commit 599fce6
Showing
26 changed files
with
2,310 additions
and
2,147 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 0 additions & 89 deletions
89
internal/authentication/file_user_provider_database_mock_test.go
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package authentication | ||
|
||
import "github.com/go-ldap/ldap/v3" | ||
|
||
// LDAPClientDialer is an abstract type that dials a ldap.Client. | ||
type LDAPClientDialer interface { | ||
// DialURL takes a single address and dials it returning the ldap.Client. | ||
DialURL(addr string, opts ...ldap.DialOpt) (client ldap.Client, err error) | ||
} | ||
|
||
// NewLDAPConnectionDialerStandard returns a new *LDAPClientDialerStandard. | ||
func NewLDAPConnectionDialerStandard() *LDAPClientDialerStandard { | ||
return &LDAPClientDialerStandard{} | ||
} | ||
|
||
// LDAPClientDialerStandard is a concrete type that dials a ldap.Client and returns it, implementing the | ||
// LDAPClientDialer. | ||
type LDAPClientDialerStandard struct{} | ||
|
||
// DialURL takes a single address and dials it returning the ldap.Client. | ||
func (d *LDAPClientDialerStandard) DialURL(addr string, opts ...ldap.DialOpt) (client ldap.Client, err error) { | ||
return ldap.DialURL(addr, opts...) | ||
} |
Oops, something went wrong.