commercetools-sdk-php-v2
The commercetools platform, import-api and 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;
41
public
function
__construct
(
string
$clientId,
string
$clientSecret,
string
$scope =
null
)
42
{
43
$this->clientId = $clientId;
44
$this->clientSecret = $clientSecret;
45
$this->scope = $scope;
46
$this->cacheKey = sha1($clientId . (
string
)$scope);
47
}
48
49
public
function
getClientId
(): string
50
{
51
return
$this->clientId;
52
}
53
54
public
function
getScope
(): ?string
55
{
56
return
$this->scope;
57
}
58
59
public
function
getClientSecret
(): string
60
{
61
return
$this->clientSecret;
62
}
63
64
public
function
getCacheKey
(): string
65
{
66
return
$this->cacheKey;
67
}
68
}
Commercetools\Client\ClientCredentials
Definition:
ClientCredentials.php:16
Commercetools\Client\ClientCredentials\getClientId
getClientId()
Definition:
ClientCredentials.php:49
Commercetools\Client\ClientCredentials\getScope
getScope()
Definition:
ClientCredentials.php:54
Commercetools\Client\ClientCredentials\__construct
__construct(string $clientId, string $clientSecret, string $scope=null)
Definition:
ClientCredentials.php:41
Commercetools\Client\ClientCredentials\getCacheKey
getCacheKey()
Definition:
ClientCredentials.php:64
Commercetools\Client\ClientCredentials\getClientSecret
getClientSecret()
Definition:
ClientCredentials.php:59
Commercetools\Client
Definition:
AnonymousFlowTokenProvider.php:5
Generated by
1.9.1