2022-01-25 20:42:35 +00:00
|
|
|
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'
|
|
|
|
|
|
|
|
TEMPLATE_FOLDER = 'templates'
|
|
|
|
STATIC_FOLDER = 'static'
|
|
|
|
|
|
|
|
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 = "/etc/door_tokens"
|
2022-02-01 22:03:06 +00:00
|
|
|
|
2022-01-25 20:42:35 +00:00
|
|
|
LDAP_URL = "ldaps://ldap.imaginaerraum.de"
|
2022-02-01 22:03:06 +00:00
|
|
|
LDAP_USER_GROUP = 'Users'
|
|
|
|
LDAP_DOMAIN = 'imaginaerraum'
|
|
|
|
LDAP_DOMAIN_EXT = 'de'
|
|
|
|
|
2022-01-25 20:42:35 +00:00
|
|
|
NFC_SOCKET = "/tmp/nfc.sock"
|
|
|
|
LOG_FILE = "/var/log/webinterface.log"
|
|
|
|
NFC_LOG = "/var/log/nfc.log"
|
|
|
|
MQTT_HOST = '10.10.21.2'
|