linotp.lib.config.global_api module

manager for the app global linotp config dict.

using rwlocks to synchronize the access to a linotp config dict for the global app context.

the purpose of this class is the speedup, so that a linotp config dict in the request context is instantiated via a deep copy from the flask app global linotp config dict instead of a database read.

class linotp.lib.config.global_api.LinotpAppConfig

Bases: object

Globals acts as a container for objects available throughout the life of the application

delConfig(conf)

delete one entry in the appl_globals

getConfig()

retrieve (the deep copy of) the actual config

isConfigComplete()

check if the linotp config read is completed.

purpose of this flag is that the configuration might be read but when the security module was not loaded, the config entry was not de-crypted. this has become obsolete by introducing the CryptedData objects which allows a lazy read.

setConfig(config, replace=False)

set the app global config for linotp

setConfigIncomplete(val=False)

set the status that the config reading is completed