commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
MeOAuthHandlerFactory.php
1<?php
2
3declare(strict_types=1);
4
6
7use GuzzleHttp\Client;
8
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}
static ofAuthConfig(MeConfig $authConfig, TokenStorage $tokenStorage)