| from gluon.contrib.login_methods.ldap_auth import ldap_auth
auth.settings.login_methods = [auth, ldap_auth(mode='ad',
bind_dn='USERNAME',
bind_pw='PASSWORD',
manage_groups=False,
manage_user=True,
user_firstname_attrib='cn:1',
user_lastname_attrib='cn:2',
server='SERVERNAME',
user_mail_attrib='mail',
base_dn='dc=DC,dc=DOMAIN',
logging_level='error',
db=db)]
# Example
from gluon.contrib.login_methods.basic_auth import basic_auth
auth.settings.login_methods.append(
basic_auth('https://basic.example.com')) |