PHPackages                             contactduty/oauth-contact-duty - 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. contactduty/oauth-contact-duty

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

contactduty/oauth-contact-duty
==============================

ContactDuty OAuth 2.0 Client Provider for The PHP League OAuth2-Client

0.0.5(7y ago)0221MITPHPPHP &gt;=5.6.0

Since Mar 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/contactduty/oauth-contact-duty)[ Packagist](https://packagist.org/packages/contactduty/oauth-contact-duty)[ Docs](https://contactduty.com/)[ RSS](/packages/contactduty-oauth-contact-duty/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (1)Versions (6)Used By (1)

ContactDuty Provider for OAuth 2.0 Client
=========================================

[](#contactduty-provider-for-oauth-20-client)

[ContactDuty](https://contactduty.com/) OAuth 2.0 support for the PHP League’s [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

```
$ composer require contactduty/oauth-contact-duty

```

Usage
-----

[](#usage)

You can get your OAuth client credentials [here](https://contactduty.com/home/api-clients).

```
try {
    $provider = new ContactDuty\OAuth2\Client([
        'clientId'          => $clientId,
        'clientSecret'      => $clientSecret,
        'redirectUri'       => $redirectUri
    ]);

    $accessToken = $provider->getAccessToken('client_credentials');

    echo 'Access Token: ' . $accessToken->getToken() . "";
    echo 'Expired in: ' . $accessToken->getExpires() . "";
    echo 'Already expired? -> ' . ($accessToken->hasExpired() ? 'expired' : 'not expired') . "";

 } catch (League\OAuth2\Client\Provider\Exception\IdentityProviderException $e) {
    // Failed to get the access token
    die($e->getMessage());
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~56 days

Total

5

Last Release

2745d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/224318dc2abffa3ae10d8eb501ee06bcb794bc3a39abd89baf8ba205d614cf06?d=identicon)[contactduty](/maintainers/contactduty)

---

Top Contributors

[![floringavrila](https://avatars.githubusercontent.com/u/3042674?v=4)](https://github.com/floringavrila "floringavrila (11 commits)")

### Embed Badge

![Health badge](/badges/contactduty-oauth-contact-duty/health.svg)

```
[![Health](https://phpackages.com/badges/contactduty-oauth-contact-duty/health.svg)](https://phpackages.com/packages/contactduty-oauth-contact-duty)
```

###  Alternatives

[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[knpuniversity/oauth2-client-bundle

Integration with league/oauth2-client to provide services

83416.7M61](/packages/knpuniversity-oauth2-client-bundle)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[microsoft/kiota-authentication-phpleague

Authentication provider for Kiota using the PHP League OAuth 2.0 client to authenticate against the Microsoft Identity platform

153.2M7](/packages/microsoft-kiota-authentication-phpleague)

PHPackages © 2026

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