Git Product home page Git Product logo

ldapauth's Introduction

ldap

Use this to authenticate a username with password against a hostname that is either a ldap or active directory.

Uses tls if possible so you don't send people's password in clear text.

This is a tiny lib to mimic the ldap util whoami. The only function you should be required to use is:

LDAPLoginResult login(string host, string username, string password);

The function will throw if the login fails for whatever reason.

On success the LDAPLoginResult will contain the userId inside the ldap/active directory.

The returnCode stored in the LDAPLoginResult will be 0 on success.

TLS

Properly using tls/ssl to connect to ldap or active directory is required but not as easy as it should. Especially, if the active directory is configured creatively.

Before you put this into production test with wireshark or similar that TLS works.

ldapauth's People

Contributors

burner avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

alexandrumc

ldapauth's Issues

auth with empty password

On the documentation page of flask-simpleldap I read:

Many LDAP servers will grant anonymous access if password is the empty string, causing this method to return True no matter what username is given. If you want to use this method to validate a username and password, rather than actually connecting to the LDAP server as a particular user, make sure password is not empty.

what would happen in these cases in this library with the login method?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.