初始化仓库
This commit is contained in:
66
vendor/alibabacloud/client/src/Credentials/BearerTokenCredential.php
vendored
Normal file
66
vendor/alibabacloud/client/src/Credentials/BearerTokenCredential.php
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace AlibabaCloud\Client\Credentials;
|
||||
|
||||
use AlibabaCloud\Client\Filter\CredentialFilter;
|
||||
use AlibabaCloud\Client\Exception\ClientException;
|
||||
|
||||
/**
|
||||
* Class BearerTokenCredential
|
||||
*
|
||||
* @package AlibabaCloud\Client\Credentials
|
||||
*/
|
||||
class BearerTokenCredential implements CredentialsInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $bearerToken;
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param string $bearerToken
|
||||
*
|
||||
* @throws ClientException
|
||||
*/
|
||||
public function __construct($bearerToken)
|
||||
{
|
||||
CredentialFilter::bearerToken($bearerToken);
|
||||
|
||||
$this->bearerToken = $bearerToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBearerToken()
|
||||
{
|
||||
return $this->bearerToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAccessKeyId()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAccessKeySecret()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return "bearerToken#$this->bearerToken";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user