protected function getAuthOptsV2() { $httpClient = new Client(['base_uri' => getenv('OS_AUTH_URL'), 'handler' => HandlerStack::create()]); $identityService = new Service($httpClient, new Api()); return ['authUrl' => getenv('OS_AUTH_URL'), 'region' => getenv('OS_REGION_NAME'), 'username' => getenv('OS_USERNAME'), 'password' => getenv('OS_PASSWORD'), 'tenantName' => getenv('OS_TENANT_NAME'), 'identityService' => $identityService]; }
public static function getAuthOptsV2() { $httpClient = new Client(['base_uri' => CommonUtils::normalizeUrl(getenv('OS_AUTH_URL')), 'handler' => HandlerStack::create()]); return ['authUrl' => getenv('OS_AUTH_URL'), 'region' => getenv('OS_REGION_NAME'), 'username' => getenv('OS_USERNAME'), 'password' => getenv('OS_PASSWORD'), 'tenantName' => getenv('OS_TENANT_NAME'), 'identityService' => new Service($httpClient, new Api())]; }
public function test_it_is_created() { $this->assertInstanceOf(HandlerStack::class, HandlerStack::create(new MockHandler())); }
private function getStack(callable $authHandler, Token $token = null) : HandlerStack { $stack = HandlerStack::create(); $stack->push(Middleware::authHandler($authHandler, $token)); return $stack; }