linotp.lib.config package¶
handle all configuration items with aspekts like persitance and syncronysation and provides this to all requests
- linotp.lib.config.getFromConfig(key, defVal=None, decrypt=False)¶
retrieve an entry from the linotp config
- Parameters
key – the name of the value
defValue – default value if the entry could not be found
decrypt – boolean, if true and the entry is an encrypted data object, return the decrypted value
- linotp.lib.config.getLinotpConfig()¶
Get the complete configuration and store in context
Calling this function results in a number of operations: * Retrieve the complete configuration from the database * Parse into a hierarchical format * Make available in application context (flap.config)
The resulting class can be found under c.linotpConfig, but is more generally accessed using the symbol config:
from linotp.flap import config foo = config[‘foo’]
- Returns
local config dict
- Return type
dict
- linotp.lib.config.refreshConfig()¶
- linotp.lib.config.removeFromConfig(key, iCase=False)¶
- linotp.lib.config.storeConfig(key, val, typ=None, desc=None)¶
storing the config entry into the db and in the global config
external interface for storing config entries, which implies the conversion of the encrypted data to an encrypted data object
- Parameters
key – name of the entry
val – the value
typ – -optional- the type
desc – -optional- the description
- linotp.lib.config.updateConfig(confi)¶
update the server config entries incl. syncing it to disc