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: 9 months ago
JSON representation
:lock_with_ink_pen:
- Host: GitHub
- URL: https://github.com/php-api-clients/psr7-oauth1
- Owner: php-api-clients
- License: mit
- Created: 2016-10-25T20:32:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-26T22:59:41.000Z (about 2 years ago)
- Last Synced: 2025-04-18T22:14:09.630Z (9 months ago)
- Topics: hacktoberfest, oauth1, php, php7, psr-7, reactphp
- Language: PHP
- Homepage:
- Size: 417 KB
- Stars: 9
- Watchers: 3
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Client-side PSR-7 Oauth1 request signer for PHP `^8 || ^7.4`
[](https://github.com/php-api-clients/psr7-oauth1/actions/workflows/ci.yml)
[](https://packagist.org/packages/api-clients/psr7-oauth1)
[](https://packagist.org/packages/api-clients/psr7-oauth1/stats)
[](https://scrutinizer-ci.com/g/php-api-clients/psr7-oauth1/?branch=master)
[](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