client; } public function get_service($opts, $useservercerts = false, $disablesslverify = null) { $user = $opts['user']; $apikey = $opts['apikey']; $authurl = $opts['authurl']; $region = (!empty($opts['region'])) ? $opts['region'] : null; require_once(UPDRAFTPLUS_DIR.'/vendor/autoload.php'); global $updraftplus; # The new authentication APIs don't match the values we were storing before $new_authurl = ('https://lon.auth.api.rackspacecloud.com' == $authurl || 'uk' == $authurl) ? Rackspace::UK_IDENTITY_ENDPOINT : Rackspace::US_IDENTITY_ENDPOINT; if (null === $disablesslverify) $disablesslverify = UpdraftPlus_Options::get_updraft_option('updraft_ssl_disableverify'); if (empty($user) || empty($apikey)) throw new Exception(__('Authorisation failed (check your credentials)', 'updraftplus')); $updraftplus->log("Cloud Files authentication URL: ".$new_authurl); $client = new Rackspace($new_authurl, array( 'username' => $user, 'apiKey' => $apikey )); $this->client = $client; if ($disablesslverify) { $client->setSslVerification(false); } else { if ($useservercerts) { $client->setConfig(array($client::SSL_CERT_AUTHORITY, 'system')); } else { $client->setSslVerification(UPDRAFTPLUS_DIR.'/includes/cacert.pem', true, 2); } } return $client->objectStoreService('cloudFiles', $region); } public function get_credentials() { return array('updraft_cloudfiles'); } public function get_opts() { global $updraftplus; $opts = $updraftplus->get_job_option('updraft_cloudfiles'); if (!is_array($opts)) $opts = array('user' => '', 'authurl' => 'https://auth.api.rackspacecloud.com', 'apikey' => '', 'path' => ''); if (empty($opts['authurl'])) $opts['authurl'] = 'https://auth.api.rackspacecloud.com'; if (empty($opts['region'])) $opts['region'] = null; return $opts; } public function config_print_middlesection() { $opts = $this->get_opts(); ?>
from your Rackspace Cloud console (read instructions here), then pick a container name to use for storage. This container will be created for you if it does not already exist.','updraftplus');?> ">