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

basicldap3

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basicldap3

Provides basic authentication using the ldap3 library

  • 0.1.2
  • PyPI
  • Socket score

Maintainers
1

Basic LDAP3

Basic LDAP is a small package that uses the ldap3 library. It can be used to authenticate a user against an LDAP server and can check whether the users is in a specific group. In addition it is possible to get user attributes if the authentication is successful.

Basic example

Import basicldap and define the server

from basicldap import Ldap

LDAP_HOST = 'ldap.server.com'
LDAP_BASE_DN = 'DC=example,DC=com'

conn = Ldap(LDAP_HOST, LDAP_BASE_DN)

# Using SSL
ssl = {"port": 636, "use_ssl": True}
conn = Ldap(LDAP_HOST, LDAP_BASE_DN, ldap3_args=ssl)

Authenticate the user

conn.authenticate(user_name, password)

Get user attributes (requires successful authentication)

# To get all attributes
conn.get_attributes()

# To get specific attributes
conn.get_attributes(['mail', 'cn])

FAQs


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