linotp.config.environment module

Pylons environment configuration

linotp.config.environment.fxn()[source]
linotp.config.environment.get_activated_resolver_modules()[source]

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

linotp.config.environment.get_default_tokens()[source]

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

Returns:array of all token module names like [“linotp.lib.tokens.smstoken”, ..]
linotp.config.environment.get_resolver_class_list()[source]

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.

linotp.config.environment.get_token_class_list()[source]

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}
linotp.config.environment.get_token_list()[source]

returns the list of the modules

Returns:list of token module names from the config file
linotp.config.environment.get_token_module_list()[source]

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