Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/php-api-clients/psr7-oauth1

:lock_with_ink_pen:
https://github.com/php-api-clients/psr7-oauth1

hacktoberfest oauth1 php php7 psr-7 reactphp

Last synced: 2 months ago
JSON representation

:lock_with_ink_pen:

Awesome Lists containing this project

README

        

# Client-side PSR-7 Oauth1 request signer for PHP `^8 || ^7.4`

[![Continuous Integration](https://github.com/php-api-clients/psr7-oauth1/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/php-api-clients/psr7-oauth1/actions/workflows/ci.yml)
[![Latest Stable Version](https://poser.pugx.org/api-clients/psr7-oauth1/v/stable.png)](https://packagist.org/packages/api-clients/psr7-oauth1)
[![Total Downloads](https://poser.pugx.org/api-clients/psr7-oauth1/downloads.png)](https://packagist.org/packages/api-clients/psr7-oauth1/stats)
[![Code Coverage](https://scrutinizer-ci.com/g/php-api-clients/psr7-oauth1/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/php-api-clients/psr7-oauth1/?branch=master)
[![License](https://poser.pugx.org/api-clients/psr7-oauth1/license.png)](https://packagist.org/packages/api-clients/psr7-oauth1)

# Installation

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```bash
composer require api-clients/psr7-oauth1
```

In case you need to support `5.5+` as well in your package, we suggest you use the following command:

```bash
composer require api-clients/psr7-oauth1:^1.0
```

However, since `1.0`, `2.0`, and `3.0` of this package are 100% compatible, we recommend you use the following command to support both:

```bash
composer require "api-clients/psr7-oauth1:^2.0 || ^1.0"
```

# Example

```php
withAccessToken(
new Definition\AccessToken('token_key'),
new Definition\TokenSecret('token_secret')
)->sign($request);
```

# Suppported signatures

All supported signatures are HMAC signatures.

## MD5

Signs request with `HMAC-MD5`. Usage:

```php