:type config: dict

def __create_handler_settings(config):
    """ :type config: dict """
    server_config = config['conf']['server']
    plugins_conf = config['conf']['plugins_enabled']

    api_handler_settings = {
        'auth_required': server_config.get('auth_required', True),
        'upstream_timeout': server_config.get('upstream_timeout', None),
        'registry': PluginBuilder.build_plugins(plugins_conf),
    }
    if api_handler_settings['auth_required']:
        api_handler_settings['auth_tokens'] = server_config['auth_tokens']

    return {
        APIHandler: api_handler_settings
    }