Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
required_params = [
'domain',
'consumer_key',
'consumer_secret']
client_params = {}
# Load required parameters.
try:
for param in required_params:
client_params[param] = cp.get(env, param)
except ConfigParser.NoOptionError:
err_msg = "Missing required option: '%s'" % param
raise Exception(err_msg)
client = Client(
domain=client_params['domain'],
realm=None,
consumer_key=client_params['consumer_key'],
consumer_secret=client_params['consumer_secret'])
# Load optional parameters.
optional_params = [
'callback_url',
'scheme',
'request_token_url',
'access_token_url',
'authorization_url',
'api_path',
'email',
'password',
'timeout']