Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gaoding/cnpm.org-ldap

Package Overview
Dependencies
Maintainers
21
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gaoding/cnpm.org-ldap

## usage <https://github.com/cnpm/cnpmjs.org/wiki/Use-Your-Own-User-Authorization>

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
21
Weekly downloads
 
Created
Source

cnpm.org-ldap

usage

https://github.com/cnpm/cnpmjs.org/wiki/Use-Your-Own-User-Authorization

const cnpmLdap = require('cnpm.org-ldap').LdapUserService
config.userService = new cnpmLdap('ldap://localhost', {
  base: 'ou=users,dc=example,dc=com',
  loginField: 'uid', // username attributes
})

options

nametypedesc
loginFieldstringwhich attribute in userObject is username
basestringwhere to search user
filterstringcustom filter example (&({{user}})(accountStatus=active))
tlsOptionsobjectnodejs tls options, used by underlay connection
dnstringlogin dn, leave blank to use anonymous
passwordstringlogin password
attributesobjectuser information

In default, this will use 'mail' field as user's email. Please use options.attributes to customize your user attribute.

interface IAttributes {
  email: string
  name?: string
  html_url?: string
  avatar_url?: string
  im_url?: string
  site_admin?: string
  scopes?: string
}

FAQs

Package last updated on 03 Jul 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

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