PHPackages                             api-skeletons/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/oauth2-doctrine-identity

ActiveLibrary[Database &amp; ORM](/categories/database)

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

Doctrine Enabled AuthenticatedIdentity

5.0.3(5y ago)09.8k↓50%3[2 issues](https://github.com/API-Skeletons/oauth2-doctrine-identity/issues)1MITPHPPHP ^7.3CI failing

Since Jul 18Pushed 5y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (14)Versions (5)Used By (1)

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

[](#oauth2-doctrine-identity)

[![Build Status](https://camo.githubusercontent.com/a5e09001bcb8487a65115d020358a412e3538f044fb15907ad6923f26c8e9689/68747470733a2f2f7472617669732d63692e6f72672f4150492d536b656c65746f6e732f6f61757468322d646f637472696e652d6964656e746974792e737667)](https://travis-ci.org/API-Skeletons/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/f529e141736e817790b84a21c0fc38a523a5b6a53de556aeda428420da289e2e/68747470733a2f2f706f7365722e707567782e6f72672f6170692d736b656c65746f6e732f6f61757468322d646f637472696e652d6964656e746974792f646f776e6c6f616473)](https://packagist.org/packages/api-skeletons/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 [laminas-api-tools/api-tools-mvc-auth](https://github.com/laminas-api-tools/api-tools-mvc-auth) returns an [`Laminas\ApiTools\MvcAuth\Identity\AuthenticatedIdentity`](https://github.com/laminas-api-tools/api-tools-mvc-auth/blob/master/src/Identity/AuthenticatedIdentity.php) when authenticated with a valid access token. This repository replaces that identity with a [`ApiSkeletons\OAuth2\Doctrine\Identity\AuthenticatedIdentity`](https://github.com/API-Skeletons/oauth2-doctrine-identity/blob/master/src/AuthenticatedIdentity.php).

[`ApiSkeletons\OAuth2\Doctrine\Identity\AuthenticatedIdentity`](https://github.com/API-Skeletons/oauth2-doctrine-identity/blob/master/src/AuthenticatedIdentity.php) stores the [api-skeletons/oauth2-doctrine](https://github.com/API-Skeletons/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/oauth2-doctrine](https://github.com/API-Skeletons/oauth2-doctrine) supports multiple OAuth2 configurations and [api-skeletons/oauth2-doctrine-identity](https://github.com/API-Skeletons/oauth2-doctrine-identity) searches through each configuration to find the `AccessToken` entity based on the `access_token` and `client_id` supplied by [`Laminas\ApiTools\MvcAuth\Identity\AuthenticatedIdentity`](https://github.com/laminas-api-tools/api-tools-mvc-auth/blob/master/src/Identity/AuthenticatedIdentity.php).

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

[](#authorization)

The api-tools-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/oauth2-doctrine-identity
```

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

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.6% 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 ~85 days

Total

4

Last Release

1868d ago

### 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 (28 commits)")[![raffykaloustian](https://avatars.githubusercontent.com/u/1461982?v=4)](https://github.com/raffykaloustian "raffykaloustian (1 commits)")

---

Tags

laminasdoctrineidentityoauth2apigility

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[doctrine/doctrine-orm-module

Laminas Module that provides Doctrine ORM functionality

4407.3M293](/packages/doctrine-doctrine-orm-module)[doctrine/doctrine-module

Laminas Module that provides Doctrine basic functionality required for ORM and ODM modules

3957.9M116](/packages/doctrine-doctrine-module)[doctrine/doctrine-mongo-odm-module

Laminas Module which provides Doctrine MongoDB ODM functionality

86676.6k35](/packages/doctrine-doctrine-mongo-odm-module)[doctrine/doctrine-laminas-hydrator

Doctrine hydrators for Laminas applications

362.8M19](/packages/doctrine-doctrine-laminas-hydrator)[laminas-api-tools/api-tools-doctrine

Laminas API Tools Doctrine module

10633.9k5](/packages/laminas-api-tools-api-tools-doctrine)[stefano/stefano-tree

Nested Set(MPTT) implementation for PHP

2788.5k](/packages/stefano-stefano-tree)

PHPackages © 2026

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