Socket
Socket
Sign inDemoInstall

verdaccio-ldap-auth

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verdaccio-ldap-auth

测试登陆


Version published
Weekly downloads
5
decreased by-81.48%
Maintainers
0
Weekly downloads
 
Created
Source

自定义verdaccio的sso授权

注意:这里使用的pnpm的overrides配置,才能正常构建

使用

pnpm add verdaccio-ldap-auth

在配置文件里这样配置

# ...
auth:
  auth:
    clientOptions:
      url: ldap://xxxxx:389 # 请求的url
      dnTimeout: 3e3 # 绑定dn超时时间
      searchTimeout: 3e3 # 搜索dn超时时间
    verifyPasswordOptions:
      adminDn: CN=npm服务,DC=163,DC=com
      adminPwd: xxxx
      baseDn: DC=163,DC=com
      searchOptions:
        filter:
          mail: "{user}@163.me" # mail是ldap字段名,user是登陆的用户名
      filter2ReplaceKey: # 用来声明,用请求的user字段填充填searchOptions的filter
        user: user
# ...

遇到中文识别不了的问题

可以尝试使用如下包进行覆盖

  "pnpm": {
    "overrides": {
      "@ldapjs/dn": "npm:ldapjs-dn-fork@1.1.0"
    }
  }

遇到node14版本识别不了

require("node:util") # 此处构建babel和rollup都不管
  "pnpm": {
    "overrides": {
      "process-warning": "~2.2.0"
    }
  }

更多问题文档 make emit work in jest

babel没有注入replaceAll

需要运行在node v14.17 环境下,该环境下一直没有 replaceAll方法,babel也未注入,需要手动引入

import 'core-js/modules/es.string.replace-all'

Keywords

FAQs

Package last updated on 27 Sep 2024

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