github.com/azratul/ldap-client-go

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
l

github.com/azratul/ldap-client-go

v0.0.0-20191223000954-f0966dd60ff4
Version published
Created
Issues
0

ldap-client-go

LDAP client to connect and retrieve information for a user.

Doesn't support TLS

Usage

package main

import (
    "github.com/azratul/ldap-client-go"
)

func main() {
    client := &ldap.Client{
        BaseDN:             "dc=subdomain,dc=domain,dc=cl",
        Host:               "subdomain.domain.cl",
        Port:               389,
        BindUser:           "cn=admin,cn=Users",
        BindPass:           "password",
        SkipTLS:            true,
    }

    defer client.Close()

    client.Connect()

    client.Search("(&(sAMAccountName=USER))", []string{"dn", "cn", "givenName", "distinguishedName", "name", "userPrincipalName"})
}

FAQs

Package last updated on 23 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts