public function authenticateAsAccount($account, $key, $tenantId = NULL, $tenantName = NULL) {
    $ops = array(
      'apiAccessKeyCredentials' => array(
        'accessKey' => $account,
        'secretKey' => $key,
      ),
    );

    if (!empty($tenantId)) {
      $ops['tenantId'] = $tenantId;
    }
    elseif (!empty($tenantName)) {
      $ops['tenantName'] = $tenantName;
    }

    return $this->authenticate($ops);
  }
public function authenticateAsAccount($account, $key, $tenantId = NULL, $tenantName = NULL) {
    $ops = array(
      'apiAccessKeyCredentials' => array(
        'accessKey' => $account,
        'secretKey' => $key,
      ),
    );

    if (!empty($tenantId)) {
      $ops['tenantId'] = $tenantId;
    }
    elseif (!empty($tenantName)) {
      $ops['tenantName'] = $tenantName;
    }

    return $this->authenticate($ops);
  }
public function authenticateAsAccount ( $ account , $ key , $ tenantId = NULL , $ tenantName = NULL ) { $ ops = array ( 'apiAccessKeyCredentials' => array ( 'accessKey' => $ account , 'secretKey' => $ key , ) , ) ; if ( ! empty ( $ tenantId ) ) { $ ops [ 'tenantId' ] = $ tenantId ; } elseif ( ! empty ( $ tenantName ) ) { $ ops [ 'tenantName' ] = $ tenantName ; } return $ this -> authenticate ( $ ops ) ; }
Authenticate to HP Helion Public Cloud using your account ID and access key.

Given an account ID and and access key (secret key), authenticate
to Identity Services. Identity Services will then issue a token that can be
used with other HPCloud services, such as Object Storage (aka Swift).

The account ID and access key information can be found in the account
section of the console.

The third and fourth paramaters allow you to specify a tenant ID or
tenantName. In order to access services, this object will need a tenant ID
or tenant name. If none is specified, it can be set later using rescope().
The tenants() method can be used to get a list of all available tenant IDs
for this token.

Note, this feature is only available in the HP Helion Public Cloud.

Other authentication methods:

- authenticateAsUser()
- authenticate()

@param string $account
The account ID. It should look something like this:
1234567890:abcdef123456.
@param string $key
The access key (i.e. secret key), which should be a series of
ASCII letters and digits.
@param string $tenantId
A valid tenant ID. This will be used to associate a tenant's services
with this token.
@param string $tenantName
The tenant Name for this account. This can be obtained through the
HPCloud console.
@retval string
@return string
The auth token.
@throws HPCloud::Transport::AuthorizationException
If authentication failed.
@throws HPCloud::Exception
For abnormal network conditions. The message will give an indication as
to the underlying problem.
Authenticate to HP Helion Public Cloud using your account ID and access key .