commercetools-sdk-php-v2
10.3.0
The platform, import-api and ml-api PHP sdks generated from our api reference.
lib
commercetools-base
src
Client
ClientCredentials.php
1
<?php
2
3
declare(strict_types=1);
10
namespace
Commercetools\Client
;
11
15
class
ClientCredentials
16
{
18
private
$clientId;
19
21
private
$clientSecret;
22
24
private
$scope;
25
27
private
$cacheKey;
28
29
public
function
__construct
(
string
$clientId,
string
$clientSecret,
string
$scope =
null
)
30
{
31
$this->clientId = $clientId;
32
$this->clientSecret = $clientSecret;
33
$this->scope = $scope;
34
$this->cacheKey = sha1($clientId . (
string
)$scope);
35
}
36
37
public
function
getClientId
(): string
38
{
39
return
$this->clientId;
40
}
41
42
public
function
getScope
(): ?string
43
{
44
return
$this->scope;
45
}
46
47
public
function
getClientSecret
(): string
48
{
49
return
$this->clientSecret;
50
}
51
52
public
function
getCacheKey
(): string
53
{
54
return
$this->cacheKey;
55
}
56
}
Commercetools\Client\ClientCredentials
Definition:
ClientCredentials.php:16
Commercetools\Client\ClientCredentials\getClientId
getClientId()
Definition:
ClientCredentials.php:37
Commercetools\Client\ClientCredentials\getScope
getScope()
Definition:
ClientCredentials.php:42
Commercetools\Client\ClientCredentials\__construct
__construct(string $clientId, string $clientSecret, string $scope=null)
Definition:
ClientCredentials.php:29
Commercetools\Client\ClientCredentials\getCacheKey
getCacheKey()
Definition:
ClientCredentials.php:52
Commercetools\Client\ClientCredentials\getClientSecret
getClientSecret()
Definition:
ClientCredentials.php:47
Commercetools\Client
Definition:
AnonymousFlowTokenProvider.php:5
Generated by
1.9.1