Skip to content

Commit 5cbfd94

Browse files
author
Jamie Hannaford
committed
allow easier creation
1 parent ad9c663 commit 5cbfd94

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Identity/v2/Api.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/**
88
* Represents the OpenStack Identity v2 API.
99
*
10-
* @internal
1110
* @package OpenStack\Identity\v2
1211
*/
1312
class Api implements ApiInterface

src/Identity/v2/Service.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace OpenStack\Identity\v2;
44

5+
use GuzzleHttp\ClientInterface;
56
use OpenStack\Common\Auth\IdentityService;
67
use OpenStack\Common\Service\AbstractService;
78
use OpenStack\Identity\v2\Models\Catalog;
@@ -14,6 +15,11 @@
1415
*/
1516
class Service extends AbstractService implements IdentityService
1617
{
18+
public static function factory(ClientInterface $client)
19+
{
20+
return new static($client, new Api());
21+
}
22+
1723
public function authenticate(array $options = [])
1824
{
1925
$definition = $this->api->postToken();

0 commit comments

Comments
 (0)