You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
649 B

  1. package ldap
  2. // import (
  3. // "fmt"
  4. // "testing"
  5. // )
  6. // var ldapServer = "ldap.itd.umich.edu"
  7. // var ldapPort = 389
  8. // var baseDN = "dc=umich,dc=edu"
  9. // var filter = []string{
  10. // "(cn=cis-fac)",
  11. // "(&(objectclass=rfc822mailgroup)(cn=*Computer*))",
  12. // "(&(objectclass=rfc822mailgroup)(cn=*Mathematics*))"}
  13. // var attributes = []string{
  14. // "cn",
  15. // "description"}
  16. // var msadsaformat = ""
  17. // func TestLDAP(t *testing.T) {
  18. // AddSource("test", ldapServer, ldapPort, baseDN, attributes, filter, msadsaformat)
  19. // user, err := LoginUserLdap("xiaolunwen", "")
  20. // if err != nil {
  21. // t.Error(err)
  22. // return
  23. // }
  24. // fmt.Println(user)
  25. // }