Skip to content

Commit

Permalink
chore: bump to latest simple-ldap-go
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDevMinerTV committed Oct 13, 2023
1 parent 681aeeb commit 6118285
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions internal/options/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import (
"strconv"

"github.com/joho/godotenv"
ldap "github.com/netresearch/simple-ldap-go"
)

type Opts struct {
LdapServer string
IsActiveDirectory bool
BaseDN string
ReadonlyUser string
ReadonlyPassword string
LDAP ldap.Config
ReadonlyUser string
ReadonlyPassword string

MinLength uint
MinNumbers uint
Expand Down Expand Up @@ -91,11 +90,13 @@ func Parse() *Opts {
panicWhenEmpty("readonly-password", fReadonlyPassword)

return &Opts{
LdapServer: *fLdapServer,
IsActiveDirectory: *fIsActiveDirectory,
BaseDN: *fBaseDN,
ReadonlyUser: *fReadonlyUser,
ReadonlyPassword: *fReadonlyPassword,
LDAP: ldap.Config{
Server: *fLdapServer,
BaseDN: *fBaseDN,
IsActiveDirectory: *fIsActiveDirectory,
},
ReadonlyUser: *fReadonlyUser,
ReadonlyPassword: *fReadonlyPassword,

MinLength: *fMinLength,
MinNumbers: *fMinNumbers,
Expand Down
2 changes: 1 addition & 1 deletion internal/rpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Handler struct {
}

func New(opts *options.Opts) (*Handler, error) {
ldap, err := ldap.New(opts.LdapServer, opts.BaseDN, opts.ReadonlyUser, opts.ReadonlyPassword, opts.IsActiveDirectory)
ldap, err := ldap.New(opts.LDAP, opts.ReadonlyUser, opts.ReadonlyPassword)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 6118285

Please sign in to comment.