初始化仓库
This commit is contained in:
29
vendor/alibabacloud/client/src/Clients/BearerTokenClient.php
vendored
Normal file
29
vendor/alibabacloud/client/src/Clients/BearerTokenClient.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace AlibabaCloud\Client\Clients;
|
||||
|
||||
use AlibabaCloud\Client\Exception\ClientException;
|
||||
use AlibabaCloud\Client\Signature\BearerTokenSignature;
|
||||
use AlibabaCloud\Client\Credentials\BearerTokenCredential;
|
||||
|
||||
/**
|
||||
* Use the Bearer Token to complete the authentication.
|
||||
*
|
||||
* @package AlibabaCloud\Client\Clients
|
||||
*/
|
||||
class BearerTokenClient extends Client
|
||||
{
|
||||
|
||||
/**
|
||||
* @param string $bearerToken
|
||||
*
|
||||
* @throws ClientException
|
||||
*/
|
||||
public function __construct($bearerToken)
|
||||
{
|
||||
parent::__construct(
|
||||
new BearerTokenCredential($bearerToken),
|
||||
new BearerTokenSignature()
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user