linotp.config.environment module

Pylons environment configuration


returns a list of strings representing the active resolver modules according to the ‘linotpResolverModules’ variable in config.ini

Format: [‘useridresolver.PasswdIdResolver’, ...]

The following modules are harcoded and will always be returned:

  • ‘useridresolver.PasswdIdResolver’
  • ‘useridresolver.LDAPIdResolver’
  • ‘useridresolver.HTTPIdResolver’
  • ‘useridresolver.SQLIdResolver’

:return module name list


get the list of the linotp default tokens from linotp.lib.tokens

Returns:array of all token module names like [“linotp.lib.tokens.smstoken”, ..]

Returns a tuple (resolver_classes, resolver_types) with resolver classes being a dict of the following format:

{ ‘class_identifier’: <class resolver> }, e.g. { ‘useridresolver.PasswdIdResolver.IdResolver : <class PasswdIdResolver> }

and the resolver_types having the format:

{ ‘fully_qualified_import_path’: ‘class_type_identifier’ }, e.g. { ‘useridresolver.PasswdIdResolver.IdResolver : ‘passwdresolver’ }

Both dictionaries are used as a type mapping of strings to classes.


provide a dict of token types and their classes

Returns:tupple of two dict -tokenclass_dict {token type : token class} -tokenprefix_dict {token type : token prefix}

returns the list of the modules

Returns:list of token module names from the config file

return the list of the available token classes like hmac, spass, totp

Returns:list of token modules
linotp.config.environment.load_environment(global_conf, app_conf)[source]

Configure the Pylons environment via the pylons.config object