commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
src
Client
MeOAuthHandlerFactory.php
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
Commercetools\Client
;
6
7
use GuzzleHttp\Client;
8
9
class
MeOAuthHandlerFactory
10
{
11
public
static
function
ofAuthConfig
(
MeConfig
$authConfig,
TokenStorage
$tokenStorage):
OAuth2Handler
12
{
13
$provider =
ProviderFactory::of
()->createTokenStorageProvider(
14
$authConfig->
getAnonUri
(),
15
$authConfig->
getRefreshUri
(),
16
$authConfig->
getCredentials
(),
17
new
Client($authConfig->
getOptions
()),
18
$tokenStorage
19
);
20
21
return
new
OAuth2Handler
($provider);
22
}
23
}
Commercetools\Api\Client\BaseAuthConfig\getOptions
getOptions()
Definition:
BaseAuthConfig.php:48
Commercetools\Client\MeConfig
Definition:
MeConfig.php:11
Commercetools\Client\MeConfig\getAnonUri
getAnonUri()
Definition:
MeConfig.php:47
Commercetools\Client\MeConfig\getCredentials
getCredentials()
Definition:
MeConfig.php:42
Commercetools\Client\MeConfig\getRefreshUri
getRefreshUri()
Definition:
MeConfig.php:52
Commercetools\Client\MeOAuthHandlerFactory
Definition:
MeOAuthHandlerFactory.php:10
Commercetools\Client\MeOAuthHandlerFactory\ofAuthConfig
static ofAuthConfig(MeConfig $authConfig, TokenStorage $tokenStorage)
Definition:
MeOAuthHandlerFactory.php:11
Commercetools\Client\OAuth2Handler
Definition:
OAuth2Handler.php:16
Commercetools\Client\ProviderFactory\of
static of()
Definition:
ProviderFactory.php:65
Commercetools\Client\TokenStorage
Definition:
TokenStorage.php:8
Commercetools\Client
Definition:
AnonymousFlowTokenProvider.php:5
Generated by
1.9.1