PHPackages                             xabbuh/oauth1-authentication - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. xabbuh/oauth1-authentication

ActiveLibrary[HTTP &amp; Networking](/categories/http)

xabbuh/oauth1-authentication
============================

OAuth1 authentication for the HTTPlug library

v1.0.0(9y ago)69.5k[1 PRs](https://github.com/xabbuh/oauth1-authentication/pulls)MITPHP ^5.5 || ^7.0

Since Jan 1Compare

[ Source](https://github.com/xabbuh/oauth1-authentication)[ Packagist](https://packagist.org/packages/xabbuh/oauth1-authentication)[ Docs](https://github.com/xabbuh/oauth1-authentication)[ RSS](/packages/xabbuh-oauth1-authentication/feed)WikiDiscussions Synced 5d ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

OAuth1 Authentication for HTTPlug
=================================

[](#oauth1-authentication-for-httplug)

[![Build Status](https://camo.githubusercontent.com/d58ef6e148d4439f49fbbbfb68fd3a069ac2e2b944589ef3c6004e08cc0792f4/68747470733a2f2f7472617669732d63692e6f72672f7861626275682f6f61757468312d61757468656e7469636174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/xabbuh/oauth1-authentication)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b6e30bf1184b64c302381ac2920a468e727a02f6fe924ca7969836cf3ddc1cd9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7861626275682f6f61757468312d61757468656e7469636174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xabbuh/oauth1-authentication/?branch=master)

Sign PSR-7 requests using OAuth1 when using them with HTTPlug clients.

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

[](#installation)

Install the OAuth1 integration using Composer:

```
$ composer require xabbuh/oauth1-authentication:^1.0
```

Usage
-----

[](#usage)

1. Configure the request signer with your consumer key and secret:

    ```
    use ApiClients\Tools\Psr7\Oauth1\Definition\ConsumerKey;
    use ApiClients\Tools\Psr7\Oauth1\Definition\ConsumerSecret;
    use ApiClients\Tools\Psr7\Oauth1\RequestSigning\RequestSigner;

    $requestSigner = new RequestSigner(
        new ConsumerKey('consumer_key'),
        new ConsumerSecret('consumer_secret')
    );
    ```

    You can also optionally specify the hash algorithm to use. Read more about that in the [api-clients/psr7-oauth1 documentation](https://github.com/php-api-clients/psr7-oauth1/blob/master/README.md).
2. Set up the OAuth1 authentication passing the configured request signer together with your access token and token secret:

    ```
    // ...
    use ApiClients\Tools\Psr7\Oauth1\Definition\AccessToken;
    use ApiClients\Tools\Psr7\Oauth1\Definition\TokenSecret;
    use Xabbuh\Http\Authentication\OAuth1;

    // ...

    $oauth = new OAuth1(
        $requestSigner,
        new AccessToken('access_token'),
        new TokenSecret('token_secret')
    );
    ```
3. Use the configured authentication with the [authentication plugin](http://php-http.org/en/latest/plugins/authentication.html):

    ```
    // ...
    use Http\Discovery\HttpClientDiscovery;
    use Http\Client\Common\PluginClient;
    use Http\Client\Common\Plugin\AuthenticationPlugin;

    // ...

    $authenticationPlugin = new AuthenticationPlugin($oauth);

    $pluginClient = new PluginClient(
        HttpClientDiscovery::find(),
        [$authenticationPlugin]
    );
    ```

###  Health Score

30

—

LowBetter than 61% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~1255 days

Total

2

Last Release

2256d ago

PHP version history (2 changes)v1.0.0PHP ^5.5 || ^7.0

1.x-devPHP ^5.6 || ^7.0

### Community

Maintainers

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

---

Tags

httppluginsecurityAuthenticationhttplugoauthoauth1

### Embed Badge

![Health badge](/badges/xabbuh-oauth1-authentication/health.svg)

```
[![Health](https://phpackages.com/badges/xabbuh-oauth1-authentication/health.svg)](https://phpackages.com/packages/xabbuh-oauth1-authentication)
```

###  Alternatives

[php-http/client-common

Common HTTP Client implementations and tools for HTTPlug

1.1k241.6M683](/packages/php-http-client-common)[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k22.6M83](/packages/hwi-oauth-bundle)[php-http/logger-plugin

PSR-3 Logger plugin for HTTPlug

29126.8M90](/packages/php-http-logger-plugin)[php-http/httplug-bundle

Symfony integration for HTTPlug

39022.0M62](/packages/php-http-httplug-bundle)[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25026.8M85](/packages/php-http-cache-plugin)[php-http/stopwatch-plugin

Symfony Stopwatch plugin for HTTPlug

26722.1M4](/packages/php-http-stopwatch-plugin)

PHPackages © 2026

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