PHPackages                             treehouselabs/keystone-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. treehouselabs/keystone-client

ActiveProject[Authentication &amp; Authorization](/categories/authentication)

treehouselabs/keystone-client
=============================

An HTTP client with automatic authentication for an OpenStack Identity Service API a.k.a. Keystone

v4.0.0(5y ago)081.3k↓50%1MITPHPPHP &gt;=5.6

Since May 20Pushed 4y ago9 watchersCompare

[ Source](https://github.com/treehouselabs/keystone-client)[ Packagist](https://packagist.org/packages/treehouselabs/keystone-client)[ RSS](/packages/treehouselabs-keystone-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (6)Versions (14)Used By (1)

Keystone Client
===============

[](#keystone-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0fbf7cbc34de2ff3c0dc994b49fa5650ce634eb362c7ec6d280bc05b685758f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74726565686f7573656c6162732f6b657973746f6e652d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/treehouselabs/keystone-client)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/70522bfdfdccd474098c4118332fb086fa5addb08c28d5945264f2493f3c67bc/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74726565686f7573656c6162732f6b657973746f6e652d636c69656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/treehouselabs/keystone-client)[![Coverage Status](https://camo.githubusercontent.com/74de4a914672831a446cd52a09ed78ab0d667173f60018e65ed5be58ede66478/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f74726565686f7573656c6162732f6b657973746f6e652d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/treehouselabs/keystone-client/code-structure)[![Quality Score](https://camo.githubusercontent.com/08ef7bd1c728a7eea1b8ed633310350149b70b9cfbeeea3a8e274b912835dd40/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f74726565686f7573656c6162732f6b657973746f6e652d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/treehouselabs/keystone-client)

A client to use when communicating with Keystone services. Uses Guzzle as the actual HTTP client library.

Installation
------------

[](#installation)

```
composer require treehouselabs/keystone-client:~3.0
```

Usage
-----

[](#usage)

Use the `ClientFactory` to create a Guzzle Client with. The factory attaches middleware that automatically requests a Keystone token and signs outgoing requests with it.

In the case of an expired token, and the request fails, a new token is fetched automatically and the request is retried with the new token.

```
use TreeHouse\Cache\CacheInterface;
use TreeHouse\Keystone\Client\ClientFactory;
use TreeHouse\Keystone\Client\Model\Tenant;

$tokenUrl     = 'http://example.org/tokens';
$username     = 'acme';
$password     = 's3cr4t';
$serviceType  = 'compute';
$serviceName  = 'api';

// $cache is a TreeHouse\Cache\CacheInterface instance
$tenant  = new Tenant($tokenUrl, $username, $password, $serviceType, $serviceName);
$client  = (new ClientFactory($cache))->createClient($tenant);

// now just use $client as you would a regular Guzzle client
$response = $client->get('posts/');
```

Testing
-------

[](#testing)

```
composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Credits
-------

[](#credits)

- [Peter Kruithof](https://github.com/treehouselabs)
- [All Contributors](../../contributors)

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 93% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~230 days

Recently: every ~405 days

Total

11

Last Release

2072d ago

Major Versions

v1.0.0 → v2.0.02015-05-12

v2.1.0 → v3.0.02015-10-19

v3.2.1 → 4.0.x-dev2016-10-05

v3.x-dev → v4.0.02020-09-09

PHP version history (2 changes)v1.0.0PHP &gt;=5.5

v3.0.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/49e70c4936c5121b835d48680dcf4bb57d21724c533dd99591e80101e4a25dd6?d=identicon)[pkruithof](/maintainers/pkruithof)

![](https://www.gravatar.com/avatar/aa2b08ed7a87334a1a0b8e302759c3587e4cbea1a1efb08f23d55cd04d1ccfc0?d=identicon)[marcojanssen](/maintainers/marcojanssen)

---

Top Contributors

[![pkruithof](https://avatars.githubusercontent.com/u/330828?v=4)](https://github.com/pkruithof "pkruithof (40 commits)")[![fieg](https://avatars.githubusercontent.com/u/1086908?v=4)](https://github.com/fieg "fieg (2 commits)")[![mnaser](https://avatars.githubusercontent.com/u/435815?v=4)](https://github.com/mnaser "mnaser (1 commits)")

---

Tags

AuthenticationtokenidentityOpenstackkeystone

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/treehouselabs-keystone-client/health.svg)

```
[![Health](https://phpackages.com/badges/treehouselabs-keystone-client/health.svg)](https://phpackages.com/packages/treehouselabs-keystone-client)
```

###  Alternatives

[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[league/oauth2-client

OAuth 2.0 Client Library

3.8k118.6M1.2k](/packages/league-oauth2-client)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[kreait/firebase-tokens

A library to work with Firebase tokens

24040.8M14](/packages/kreait-firebase-tokens)[facile-it/php-openid-client

OpenID (OIDC) Client

42592.7k7](/packages/facile-it-php-openid-client)[telesign/telesign

TeleSign SDK

162.1M2](/packages/telesign-telesign)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
