PHPackages                             oihana/php-zitadel - 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. oihana/php-zitadel

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

oihana/php-zitadel
==================

Composable PHP toolkit for the Zitadel identity provider. Bundles an OIDC/OAuth2 API client, JWT/JWKS verification, session lifecycle helpers backed by ArangoDB, OAuth client metadata resolution, V2 Action webhook catalog and descriptor, and Symfony Console commands.

04↓100%PHP

Since May 31Pushed 1w agoCompare

[ Source](https://github.com/BcommeBois/oihana-php-zitadel)[ Packagist](https://packagist.org/packages/oihana/php-zitadel)[ RSS](/packages/oihana-php-zitadel/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Oihana PHP Zitadel
==================

[](#oihana-php-zitadel)

[![Oihana PHP Zitadel](https://raw.githubusercontent.com/BcommeBois/oihana-php-zitadel/main/assets/images/oihana-php-zitadel-logo-inline-512x160.png)](https://raw.githubusercontent.com/BcommeBois/oihana-php-zitadel/main/assets/images/oihana-php-zitadel-logo-inline-512x160.png)

Composable PHP toolkit for the [Zitadel](https://zitadel.com/) identity provider. Part of the **Oihana PHP** ecosystem, this package bundles an OIDC/OAuth2 API client, JWT/JWKS verification, ArangoDB-backed session lifecycle helpers, OAuth client metadata resolution, V2 Action webhook catalog and descriptor, and Symfony Console commands.

[![Latest Version](https://camo.githubusercontent.com/e1ae25cc1d840b6b4413b079fd5f791e81cd9ae88f84f619bef8ba9b1c096067/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6968616e612f7068702d7a69746164656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oihana/php-zitadel)[![Total Downloads](https://camo.githubusercontent.com/51eb7cf0d20d98bf6da4d10bf975bdd5dcdf8e84c1b575dd2f5a89e9dcf08c7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6968616e612f7068702d7a69746164656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oihana/php-zitadel)[![License](https://camo.githubusercontent.com/4f128b7c609487c3b528ddabeacfffff2944bad4310b32c2d70d7a2ff6fc309d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f6968616e612f7068702d7a69746164656c2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

📚 Documentation
---------------

[](#-documentation)

Full API reference (generated with phpDocumentor): `https://bcommebois.github.io/oihana-php-zitadel`

User guides (FR + EN) live under [`wiki/`](wiki/).

📦 Installation
--------------

[](#-installation)

Requires [PHP 8.4+](https://php.net/releases/) and a [Zitadel](https://zitadel.com/) instance reachable over HTTPS. Install via [Composer](https://getcomposer.org/):

```
composer require oihana/php-zitadel
```

✨ What you can do
-----------------

[](#-what-you-can-do)

- **Talk to Zitadel over the Management + Auth APIs** through `ZitadelClient` — a Guzzle-based HTTP client composed of focused traits (`ZitadelClientApplicationTrait`, `ZitadelClientPasswordTrait`, `ZitadelClientRoleTrait`, `ZitadelClientServiceTrait`, `ZitadelClientSessionTrait`, `ZitadelClientTargetTrait`, `ZitadelClientUserTrait`), with typed enums for endpoints, scopes, grants, query methods, error ids and outcomes.
- **Resolve OAuth clients to human-readable names** via `OAuthClientResolver` — in-process TTL cache + ArangoDB `oauth_clients` mirror + fallback to the Zitadel Management API for auto-seeding.
- **Mirror Zitadel sessions in ArangoDB** via `SessionCreatorTrait` — upsert on `[identifier, clientId, userAgent, active]`, sid anchoring from the id-token claims, IP + User-Agent capture, first-login activation + pending invitation acceptance.
- **Build V2 Action webhook handlers** via `ZitadelWebhookDescriptor` + `ZitadelWebhookCatalog` — typed event keys, route declaration, secret rotation, validation.
- **Plug into a CLI** through the included `ZitadelWebhookCommand` — declarative webhook synchronization between Zitadel and the application.

### Under the hood

[](#under-the-hood)

- A consistent set of typed enums and constants — `ZitadelEndpoint`, `ZitadelEndpointPlaceholder`, `ZitadelScope`, `ZitadelGrant`, `ZitadelQueryMethod`, `ZitadelError`, `ZitadelErrorId`, `ZitadelOutcome`, `ZitadelSessionField`, `ZitadelSessionSearchParam`, `ZitadelMessageKeyword`, `ZitadelOutput`, `ZitadelAppAuthMethod`, `ZitadelCookie` — no magic strings.
- Pure-PHP HTTP transport based on [GuzzleHttp](https://github.com/guzzle/guzzle) v7.
- JWT/JWKS verification through [firebase/php-jwt](https://github.com/firebase/php-jwt) v7.
- Persistence delegated to [`oihana/php-arango`](https://github.com/BcommeBois/oihana-php-arango) for OAuth client mirror + session storage.

✅ Running tests
---------------

[](#-running-tests)

Run all tests:

```
composer test
```

Run a specific test file:

```
composer test ./tests/oihana/zitadel/webhooks/ZitadelWebhookDescriptorTest.php
```

The unit tests cover the OAuth client resolver, the session creator trait (with a PSR-7 mocked request), the webhook catalog and descriptor, the webhook command, error ids and selected client traits — they run without a live Zitadel instance.

🛠️ Generate the documentation
-----------------------------

[](#️-generate-the-documentation)

We use [phpDocumentor](https://phpdoc.org/) to generate documentation into the `./docs` folder.

```
composer doc
```

🧾 License
---------

[](#-license)

Licensed under the [Mozilla Public License 2.0 (MPL‑2.0)](https://www.mozilla.org/en-US/MPL/2.0/).

👤 About the author
------------------

[](#-about-the-author)

- Author: Marc ALCARAZ (aka eKameleon)
- Email: `marc@ooop.fr`
- Website: `https://www.ooop.fr`

🔗 Related packages
------------------

[](#-related-packages)

PackageDescription[oihana/php-arango](https://github.com/BcommeBois/oihana-php-arango)Composable toolkit for ArangoDB — document/edge models, AQL helpers, controllers.[oihana/php-auth](https://github.com/BcommeBois/oihana-php-auth)Casbin RBAC + JWT/OIDC authorization toolkit.[oihana/php-commands](https://github.com/BcommeBois/oihana-php-commands)Symfony Console kernel and reusable command traits.[oihana/php-core](https://github.com/BcommeBois/oihana-php-core)Core helpers and utilities shared across the ecosystem.[oihana/php-enums](https://github.com/BcommeBois/oihana-php-enums)Typed constants and enums — no more magic strings.[oihana/php-files](https://github.com/BcommeBois/oihana-php-files)File system helpers (paths, readers, writers).[oihana/php-http](https://github.com/BcommeBois/oihana-php-http)HTTP helpers — client IP, cookies, route patterns.[oihana/php-reflect](https://github.com/BcommeBois/oihana-php-reflect)Reflection and object hydration utilities.[oihana/php-schema](https://github.com/BcommeBois/oihana-php-schema)Schema.org constants and vocabulary.[oihana/php-system](https://github.com/BcommeBois/oihana-php-system)Framework helpers — controllers, models, request handling.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance64

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![ekameleon](https://avatars.githubusercontent.com/u/749032?v=4)](https://github.com/ekameleon "ekameleon (8 commits)")

### Embed Badge

![Health badge](/badges/oihana-php-zitadel/health.svg)

```
[![Health](https://phpackages.com/badges/oihana-php-zitadel/health.svg)](https://phpackages.com/packages/oihana-php-zitadel)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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