Socket
Socket
Sign inDemoInstall

nestjs-ldap

Package Overview
Dependencies
107
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nestjs-ldap

NestJS library to access LDAP


Version published
Weekly downloads
82
increased by49.09%
Maintainers
1
Install size
14.0 MB
Created
Weekly downloads
 

Readme

Source

NestJS LDAP

Nest Logo

Description

A NestJS library for LDAP (ActiveDirectory)

Installation

$ yarn add nestjs-ldap

Usage

  import { LdapModule, ldapADattributes } from 'nestjs-ldap';

  @Module({
    imports: [
      ...
      LdapModule.registerAsync({
        inject: [ConfigService],
        useFactory: async (configService: ConfigService) => (
          {
            cache: new Redis(), /* optional */
            cacheUrl: 'redis://username:password@example.com:6379/0', /* optional */
            cacheTtl: 600, /* optional */
            domains: [
              'example.com' => {
                url: 'ldaps://pdc.example.local:389',
                bindDN: 'CN=Administrator,DC=example,DC=local',
                bindCredentials: 'PaSsWoRd123',
                searchBase: 'DC=example,DC=local',
                searchFilter: '(&(&(|(&(objectClass=user)(objectCategory=person))(&(objectClass=contact)(objectCategory=person)))))',
                searchScope: 'sub' as Scope,
                groupSearchBase: 'DC=example,DC=local',
                groupSearchFilter: '(&(objectClass=group)(member={{dn}}))',
                groupSearchScope: 'sub' as Scope,
                groupDnProperty: 'dn',
                hideSynchronization: false,
                searchBaseAllUsers: 'DC=example,DC=local',
                searchFilterAllUsers: '(&(&(|(&(objectClass=user)(objectCategory=person))(&(objectClass=contact)(objectCategory=person)))))',
                searchFilterAllGroups: 'objectClass=group',
                searchScopeAllUsers: 'sub' as Scope,
                newObject: 'OU=User,DC=example,DC=local',
                reconnect: true,
                groupSearchAttributes: ldapADattributes,
                searchAttributes: ldapADattributes,
                searchAttributesAllUsers: ldapADattributes,
              },
            ]
          }),
      }),
      ...
    ]
  })
  export class AppModule {}

License

NestJS-ldap is MIT licensed.

Keywords

FAQs

Last updated on 23 Jun 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc