Blame view

vendor/alibabacloud/client/src/Clients/StsClient.php 766 Bytes
f0d6cde5   xu   vendor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?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()
        );
    }
}