linotp.provider.config_parsing module

class linotp.provider.config_parsing.ConfigParsingMixin

Bases: object

static load_client_cert(configDict, client_cert_key='access_certificate')

return the client certificate from the configuration

Parameters

configDict

Returns

return the validated client certificate reference

static load_proxy(configDict)

return the proxy defintion from the configuartion

Parameters

configDict

Returns

the proxy definition dict like {https: ‘https_proxy’ ..}

static load_server_cert(config, server_cert_key='server_certificate')

get the server certificate verification policy

server_certificate can be: - string: used as path to server certificate file - not provided / None: which means server cert verification - ‘false’ or False: no server certificate verification

Parameters

config

Returns

(None|False|string)

static load_server_url(configDict, server_url_key='server_url')

return the server url

Parameters

configDict

Returns

return the validated server url

static load_timeout(configDict, timeout_default=None)

simple timeout or timeout tuple

timeout could come with capital letter and could be a

  • simple timeout (float) or

  • a tuple of connection and request timeout (float)

Parameters
  • configDict – the configuration dictionary

  • timeout_default – a fallback for the timeout

Returns

None, a float or a tuple of connection and network timeout