You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
766 B
28 lines
766 B
<?php
|
|
|
|
namespace AlibabaCloud\Client\Clients;
|
|
|
|
use AlibabaCloud\Client\Credentials\StsCredential;
|
|
use AlibabaCloud\Client\Exception\ClientException;
|
|
use AlibabaCloud\Client\Signature\ShaHmac1Signature;
|
|
|
|
/**
|
|
* Use the STS Token to complete the authentication.
|
|
*/
|
|
class StsClient extends Client
|
|
{
|
|
/**
|
|
* @param string $accessKeyId Access key ID
|
|
* @param string $accessKeySecret Access Key Secret
|
|
* @param string $securityToken Security Token
|
|
*
|
|
* @throws ClientException
|
|
*/
|
|
public function __construct($accessKeyId, $accessKeySecret, $securityToken = '')
|
|
{
|
|
parent::__construct(
|
|
new StsCredential($accessKeyId, $accessKeySecret, $securityToken),
|
|
new ShaHmac1Signature()
|
|
);
|
|
}
|
|
}
|
|
|