Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
sinopia-ldap
Advanced tools
Readme
$ npm install sinopia
$ npm install sinopia-ldap
Add to your config.yaml
:
auth:
ldap:
type: ldap
groupNameAttribute: 'cn'
client_options:
url: "ldaps://ldap.example.com"
adminDn: "cn=admin,dc=example,dc=com"
adminPassword: "admin"
searchBase: "ou=People,dc=example,dc=com"
searchFilter: "(uid={{username}})"
cache: False
searchAttributes:
- "*"
- memberOf
tlsOptions:
rejectUnauthorized: False
It's called as:
require('sinopia-ldap')(config, stuff)
Where:
This should export two functions:
adduser(user, password, cb)
It should respond with:
cb(err)
in case of an error (error will be returned to user)cb(null, false)
in case registration is disabled (next auth plugin will be executed)cb(null, true)
in case user registered successfullyIt's useful to set err.status
property to set http status code (e.g. err.status = 403
).
authenticate(user, password, cb)
It should respond with:
cb(err)
in case of a fatal error (error will be returned to user, keep those rare)cb(null, false)
in case user not authenticated (next auth plugin will be executed)cb(null, [groups])
in case user is authenticatedGroups is an array of all users/usergroups this user has access to. You should probably include username itself here.
FAQs
LDAP auth plugin for sinopia
The npm package sinopia-ldap receives a total of 0 weekly downloads. As such, sinopia-ldap popularity was classified as not popular.
We found that sinopia-ldap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.