I want to do have a website on which I can register a few usernames. Only they may authentiicate and they must authenticate against a central ldap server.
At the moment I have the following in db.py: if request.env.web2py_runtime_gae: # if running on Google App Engine db = DAL('gae') # connect to Google BigTable session.connect(request, response, db=db) # and store sessions and tickets there else: # else use a normal relational database db = DAL('sqlite://storage.sqlite') # if not, use SQLite or other DB from gluon.contrib.login_methods.ldap_auth import ldap_auth from gluon.tools import * auth=Auth(globals(),db) # authentication/authorization crud=Crud(globals(),db) # for CRUD helpers using auth service=Service(globals()) # for json, xml, jsonrpc, xmlrpc, amfrpc auth.settings.login_methods=[ldap_auth(server='stbldap01.sun.ac.za',base_dn='ou=users,O=SU', mode='cn', secure=True)] auth.settings.table_user = db.define_table("auth_user",db.Field("first_name",length=128,default=""), db.Field("last_name", length=128,default=""), db.Field("email", length=128,default=""), db.Field("username", length=32,default=""), db.Field("password",'password',readable=False, label="Password"), db.Field("registration_key", length=128, writable=False, readable=False, default="")) t = auth.settings.table_user t.first_name.requires = IS_NOT_EMPTY() t.username.requires = IS_NOT_EMPTY() t.last_name.requires = IS_NOT_EMPTY() t.password.requires = CRYPT() # password will be stored hashed t.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, db.auth_user.email)] t.username.requires = [IS_NOT_IN_DB(db, db.auth_user.username)] auth.define_tables() ### auth_user will not be redefined! crud.settings.auth=auth # enforces authorization on crud mail=Mail() # mailer mail.settings.server='localhost' # your SMTP server mail.settings.sender='johann.sp...@gmail.com' # your email Now my question: When I register a user I don't want the user to enter a password because when the user logs in in future the password must be checked against the hash in the LDAP tree. So when I register myself (with or without a password on registration) I cannot log in afterwords. All my logins ends with "Invalid login". How can I find out what went wrong? Is ther some sort of log somewhere? Regards Johann --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---