title: Proper use of Flask-ldap
body: <p>I am currently trying to use Flask-LDAP for authentication purposes for Sandman. Unlike normal python LDAP where the documentation is pretty straight forward, this is pretty offbase.</p>
  
  <p>Example from documentation.</p>
  
  <pre><code>from flask import Flask
  from flask.ext.ldap import LDAP, login_required
  from flask.ext.pymongo import PyMongo
  app = Flask(__name__)
  app.debug = True
  
  app.config['LDAP_HOST'] = 'ldap.example.com'
  app.config['LDAP_DOMAIN'] = 'example.com'
  app.config['LDAP_SEARCH_BASE'] = 'OU=Domain Users,DC=example,DC=com'
  app.config['LDAP_LOGIN_VIEW'] = 'custom_login'
  
  app.config['MONGO_DBNAME'] = 'simpledb'
  mongo = PyMongo(app, config_prefix='MONGO')
  ldap = LDAP(app, mongo)
  app.secret_key = "welfhwdlhwdlfhwelfhwlehfwlehfelwehflwefwlehflwefhlwefhlewjfhwelfjhweflhweflhwel"
  app.add_url_rule('/login', 'login', ldap.login, methods=['GET', 'POST'])
  </code></pre>
  
  <p>This does not tell me where I can place my dn or password. So I am completely confused as to how this thing actually works.</p>
  
  <p>Has anyone effectively used Flask-LDAP and if so how did you set it up? Or is there a better product out there like flask-login that I should use?</p>
  
  <p>Thanks,</p>