Skip to content

Commit

Permalink
fix: Exception using extensibleObject
Browse files Browse the repository at this point in the history
Signed-off-by: 孙林耀 <[email protected]>
  • Loading branch information
MicroOps-cn committed Jun 12, 2023
1 parent 7c7f3ba commit 9a2a1a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/client/ldap/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"crypto/tls"
"encoding/json"
"fmt"
tls2 "github.com/MicroOps-cn/idas/pkg/client/internal/tls"
"net"
"regexp"
"time"
Expand All @@ -34,6 +33,7 @@ import (
"github.com/pkg/errors"

"github.com/MicroOps-cn/idas/api"
tls2 "github.com/MicroOps-cn/idas/pkg/client/internal/tls"
"github.com/MicroOps-cn/idas/pkg/utils/signals"
)

Expand Down
9 changes: 6 additions & 3 deletions pkg/client/ldap/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ package ldap
import (
"bytes"
"fmt"
"github.com/MicroOps-cn/idas/pkg/client/internal/tls"
"strings"

"github.com/asaskevich/govalidator"
"github.com/gogo/protobuf/jsonpb"
"github.com/pkg/errors"

"github.com/MicroOps-cn/idas/pkg/client/internal/tls"
)

type pbLdapOptions LdapOptions
Expand Down Expand Up @@ -76,12 +77,14 @@ func NewLdapOptions() *LdapOptions {
AppSearchBase: "ou=groups,dc=example,dc=org",
UserSearchFilter: "(&(objectClass=inetOrgPerson)(uid={}))",
AppSearchFilter: "(&(|(objectclass=groupOfNames)(objectclass=groupOfUniqueNames))(cn={}))",
AppObjectClass: "groupOfUniqueNames",
AppObjectClass: "groupOfNames",
AttrEmail: "mail",
AttrUsername: "uid",
AttrUserDisplayName: "cn",
AttrUserPhoneNo: "telephoneNumber",
TLS: &tls.TLSOptions{},
TLS: &tls.TLSOptions{
MinVersion: "TLS12",
},
}
}

Expand Down
9 changes: 3 additions & 6 deletions pkg/client/ldap/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,15 @@ func (s *Session) ExternalBind() error {
}

func (s *Session) NTLMUnauthenticatedBind(domain, username string) error {
//TODO implement me
panic("implement me")
return s.c.NTLMUnauthenticatedBind(domain, username)
}

func (s *Session) Unbind() error {
//TODO implement me
panic("implement me")
return s.c.Unbind()
}

func (s *Session) ModifyWithResult(request *ldap.ModifyRequest) (*ldap.ModifyResult, error) {
//TODO implement me
panic("implement me")
return s.c.ModifyWithResult(request)
}

func (s *Session) Error() error {
Expand Down

0 comments on commit 9a2a1a4

Please sign in to comment.