New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/insomniacoder/ldap-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/insomniacoder/ldap-api

  • v0.0.0-20210624034603-b2b29d9a0176
  • Source
  • Go
  • Socket score

Version published
Created
Source

Instruction

This project is created to provide RESTFul APIs for LDAP operations.

It is created using go-ldap package and wrapped in gin-gonic for providing API.

Local

  • go mod init github.com/insomniacoder/ldap-api
  • set up environment varialbe in .envrc
export LDAP_URL="ldap://<your-ldap-domain>:<port>"
export ADMIN_DN="cn=admin,dc=your,dc=domain,dc=com"
export ADMIN_PASSWD="password"
//%s is used for templating your id into
export USER_DN_FORMAT="uid=%s,ou=personal,dc=your,dc=domain,dc=com"
  • and run direnv allow .
  • go run main.go

Docker

  • run docker build . -t ldap-api:latest
  • run docker run -p 8080:8080 -d -e LDAP_URL="<>" -e ADMIN_DN="<>" -e ADMIN_PASSWD="<>" -e USER_DN_FORMAT="<>" ldap-api:latest

API usage

Endpoints

POST /ldaps/users

request body:

{
 "id"   : "testgo",
 "firstName"   : "firstName",
 "lastName"   : "lastName",
 "email"   : "testgo3@mail.com"
}

response:

generated password

FAQs

Package last updated on 24 Jun 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc