File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed
Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 1- # API Client PSR-7 Oauth1
1+ # PSR-7 Oauth1 request signer
22
33[ ![ Build Status] ( https://travis-ci.org/php-api-clients/psr7-oauth1.svg?branch=master )] ( https://travis-ci.org/php-api-clients/psr7-oauth1 )
44[ ![ Latest Stable Version] ( https://poser.pugx.org/api-clients/psr7-oauth1/v/stable.png )] ( https://packagist.org/packages/api-clients/psr7-oauth1 )
77[ ![ License] ( https://poser.pugx.org/api-clients/psr7-oauth1/license.png )] ( https://packagist.org/packages/api-clients/psr7-oauth1 )
88[ ![ PHP 7 ready] ( http://php7ready.timesplinter.ch/php-api-clients/psr7-oauth1/badge.svg )] ( https://appveyor-ci.org/php-api-clients/psr7-oauth1 )
99
10+ # Installation
11+
12+ To install via [ Composer] ( http://getcomposer.org/ ) , use the command below, it will automatically detect the latest version and bind it with ` ^ ` .
13+
14+ ``` bash
15+ composer require api-clients/psr7-oauth1
16+ ```
17+
18+ # Example
19+
20+ ``` php
21+ <?php
22+
23+ $requestSigner = new RequestSigner(
24+ new ConsumerKey('consumer_key'),
25+ new ConsumerSecret('consumer_secret')
26+ );
27+
28+ // Returns a signed PSR7 request you can use in any PSR7 capable HTTP client
29+ $request = $requestSigner->withAccessToken(
30+ new AccessToken('token_key'),
31+ new TokenSecret('token_secret')
32+ )->sign($request);
33+ ```
34+
35+
36+ # Contributing
37+
38+ Please see [ CONTRIBUTING] ( CONTRIBUTING.md ) for details.
39+
1040# License
1141
1242The MIT License (MIT)
You can’t perform that action at this time.
0 commit comments