print("loading default config") import bleach from flask_security import uia_email_mapper def uia_username_mapper(identity): # we allow pretty much anything - but we bleach it. return bleach.clean(identity, strip=True) class DefaultConfig(object): DEBUG = False SECRET_KEY = 'supersecret' SECURITY_PASSWORD_SALT = 'salty' SECURITY_REGISTERABLE = False SECURITY_CHANGEABLE = True SECURITY_RECOVERABLE = True SECURITY_SEND_PASSWORD_CHANGE_EMAIL = False SECURITY_POST_LOGIN_VIEW = '/' SECURITY_EMAIL_SUBJECT_PASSWORD_RESET = 'Passwort zurücksetzen' SECURITY_EMAIL_SUBJECT_PASSWORD_NOTICE = 'Passwort wurde zurückgesetzt' SECURITY_PASSWORD_LENGTH_MIN = 10 SECURITY_USER_IDENTITY_ATTRIBUTES = [ {"email": {"mapper": uia_email_mapper, "case_insensitive": True}}, {"username": {"mapper": uia_username_mapper}} ] # mail configuration MAIL_SERVER = '' MAIL_PORT = 465 MAIL_USE_SSL = True MAIL_USERNAME = '' MAIL_PASSWORD = '' MAIL_DEFAULT_SENDER = '' SQLALCHEMY_DATABASE_URI = 'sqlite:///admin.db' # As of Flask-SQLAlchemy 2.4.0 it is easy to pass in options directly to the # underlying engine. This option makes sure that DB connections from the # pool are still valid. Important for entire application since # many DBaaS options automatically close idle connections. SQLALCHEMY_ENGINE_OPTIONS = { "pool_pre_ping": True, } KEY_FILE = '/root/flask_keys' TOKEN_FILE = "door_tokens" ADMIN_FILE = 'admins' LDAP_URL = "ldaps://ldap.imaginaerraum.de" LDAP_USER_GROUP = 'Users' LDAP_DOMAIN = 'imaginaerraum' LDAP_DOMAIN_EXT = 'de' NFC_SOCKET = "/tmp/nfc.sock" LOG_FILE = "webinterface.log" NFC_LOG = "nfc.log" MQTT_HOST = '10.10.21.2'