PHPackages                             api-skeletons/zf-oauth2-doctrine-identity - 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. [Database &amp; ORM](/categories/database)
4. /
5. api-skeletons/zf-oauth2-doctrine-identity

Abandoned → [api-skeletons/oauth2-doctrine-identity](/?search=api-skeletons%2Foauth2-doctrine-identity)Library[Database &amp; ORM](/categories/database)

api-skeletons/zf-oauth2-doctrine-identity
=========================================

Doctrine Enabled AuthenticatedIdentity

3.0.1(8y ago)356.5k↓50%41MITPHPPHP ^7.1

Since Dec 28Pushed 7y ago2 watchersCompare

[ Source](https://github.com/API-Skeletons/zf-oauth2-doctrine-identity)[ Packagist](https://packagist.org/packages/api-skeletons/zf-oauth2-doctrine-identity)[ RSS](/packages/api-skeletons-zf-oauth2-doctrine-identity/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (13)Used By (1)

OAuth2 Doctrine Identity
------------------------

[](#oauth2-doctrine-identity)

[![Build Status](https://camo.githubusercontent.com/7e1cc0041f7b9baf89af82340d8fe30543202d90e9cace752b5b5d164be2ab9c/68747470733a2f2f7472617669732d63692e6f72672f4150492d536b656c65746f6e732f7a662d6f61757468322d646f637472696e652d6964656e746974792e737667)](https://travis-ci.org/API-Skeletons/zf-oauth2-doctrine-identity)[![Gitter](https://camo.githubusercontent.com/c45f0485e89d3cd41f666d7d4bb5875cb59836555e05b6b11f77ed223eb64c0c/68747470733a2f2f6261646765732e6769747465722e696d2f6170692d736b656c65746f6e732f6f70656e2d736f757263652e737667)](https://gitter.im/api-skeletons/open-source)[![Patreon](https://camo.githubusercontent.com/f9e075baad95563481d35174d43ef50757281abb6bc795d0f473fad452afa030/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617472656f6e2d646f6e6174652d79656c6c6f772e737667)](https://www.patreon.com/apiskeletons)[![Total Downloads](https://camo.githubusercontent.com/77a3a5f97f1d140f4b6091d5013d347f3c96aea52bf82a146455ae2a3d3cf50d/68747470733a2f2f706f7365722e707567782e6f72672f6170692d736b656c65746f6e732f7a662d6f61757468322d646f637472696e652d6964656e746974792f646f776e6c6f616473)](https://packagist.org/packages/api-skeletons/zf-oauth2-doctrine-identity)

Versions
--------

[](#versions)

1.x for PHP 5.5 to 7.0. 2.x for PHP 7.1 onward.

About
-----

[](#about)

By default [zfcampus/zf-mvc-auth](https://github.com/zfcampus/zf-mvc-auth) returns an [`ZF\MvcAuth\Identity\AuthenticatedIdentity`](https://github.com/zfcampus/zf-mvc-auth/blob/master/src/Identity/AuthenticatedIdentity.php) when authenticated with a valid access token. This repository replaces that identity with a [`ZF\OAuth2\Doctrine\Identity\AuthenticatedIdentity`](https://github.com/API-Skeletons/zf-oauth2-doctrine-identity/blob/master/src/AuthenticatedIdentity.php).

[`ZF\OAuth2\Doctrine\Identity\AuthenticatedIdentity`](https://github.com/API-Skeletons/zf-oauth2-doctrine-identity/blob/master/src/AuthenticatedIdentity.php) stores the [api-skeletons/zf-oauth2-doctrine](https://github.com/API-Skeletons/zf-oauth2-doctrine) `AccessToken` Doctrine entity. The `AuthentiatedIdentity` has the functions `getUser()`, `getAccessToken()`, `getClient()` which return entities. With these your application can continue to work with ORM through the rest of the request lifecycle.

[api-skeletons/zf-oauth2-doctrine](https://github.com/API-Skeletons/zf-oauth2-doctrine) supports multiple OAuth2 configurations and [api-skeletons/zf-oauth2-doctrine-identity](https://github.com/API-Skeletons/zf-oauth2-doctrine-identity) searches through each configuration to find the `AccessToken` entity based on the `access_token` and `client_id` supplied by [`ZF\MvcAuth\Identity\AuthenticatedIdentity`](https://github.com/zfcampus/zf-mvc-auth/blob/master/src/Identity/AuthenticatedIdentity.php).

Authorization
-------------

[](#authorization)

The zf-mvc-auth Authorization Service is injected into the `AuthenticatedIdentity`. You may fetch the Authorization Service with `$identity->getAuthorizationService()`. There is a convenience method for ACL `$identity->isAuthorized($resource, $privilege)`.

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

[](#installation)

Installation of this module uses composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

```
composer require api-skeletons/zf-oauth2-doctrine-identity
```

This will be added to your application's list of modules:

```
'modules' => array(
   ...
   'ZF\OAuth2\Doctrine\Identity',
),
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% 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 ~45 days

Recently: every ~90 days

Total

12

Last Release

2927d ago

Major Versions

1.0.7 → 2.0.02017-10-06

2.0.1 → 3.0.02018-04-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/49dd7d9dba889ac674b0da447d9c1e69d1128dc3ccbaef98ba83d6ee519fc2d6?d=identicon)[tom\_anderson](/maintainers/tom_anderson)

---

Top Contributors

[![TomHAnderson](https://avatars.githubusercontent.com/u/493920?v=4)](https://github.com/TomHAnderson "TomHAnderson (17 commits)")[![raffykaloustian](https://avatars.githubusercontent.com/u/1461982?v=4)](https://github.com/raffykaloustian "raffykaloustian (1 commits)")

---

Tags

doctrineidentityoauth2apigility

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/api-skeletons-zf-oauth2-doctrine-identity/health.svg)

```
[![Health](https://phpackages.com/badges/api-skeletons-zf-oauth2-doctrine-identity/health.svg)](https://phpackages.com/packages/api-skeletons-zf-oauth2-doctrine-identity)
```

###  Alternatives

[majkl578/nette-identity-doctrine

Integration of entities implementing IIdentity in Nette 2

28119.1k](/packages/majkl578-nette-identity-doctrine)

PHPackages © 2026

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