8000 minor changes to the SDK · oauth-io/sdk-php@39f6f8b · GitHub
[go: up one dir, main page]

Skip to content

Commit 39f6f8b

Browse files
committed
minor changes to the SDK
1 parent 65ee33a commit 39f6f8b

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ OAuth.io PHP SDK
33

44
OAuth that just works !
55

6-
This SDK allows you to use OAuth.io's server-side flow from a PHP backend, to handle access tokens from your server instead of directly from your front-end.
6+
This SDK allows you to use OAuth.io from a PHP backend, to handle access tokens from your server instead of directly from your front-end.
77

8-
You can use it with one of our front-end SDKs ([JavaScript][1], [PhoneGap][2], [iOs][3], [Android][4]), which will handle the user input for the OAuth flow.
9-
10-
The current version of the SDK is `0.2.0`. Older versions are deprecated.
8+
The current version of the SDK is `0.3.0`. Older versions are deprecated.
119

1210
You can also get nightlies by checking out our `develop` branch.
1311

12+
To get more information about this SDK and its method, please refer to its [reference documentation](https://oauth.io/docs/api-reference/server/php) on OAuth.io.
13+
1414
Features
1515
--------
1616

@@ -24,16 +24,13 @@ Common use-Case
2424

2525
You don't want to use APIs directly from the front-end, but rather through web-services inside your PHP backend.
2626

27-
Server-side flow
28-
----------------
27+
Installation
28+
------------
2929

30-
To authenticate the user, you'll need to set your app's backend to **PHP** in your OAuth.io [dashboard](https://oauth.io/dashboard).
30+
First of all, you'll need to set your app's backend to **PHP** in your OAuth.io [dashboard](https://oauth.io/dashboard).
3131

3232
This allows you to get a refresh token from the provider if available.
3333

34-
Installation
35-
------------
36-
3734
You can install it through Composer by adding the following dependency to your composer.json :
3835

3936
```json
@@ -50,10 +47,10 @@ Then run in the console :
5047
$ composer install
5148
```
5249

53-
How to use it ?
54-
---------------
50+
Using the SDK
51+
-------------
5552

56-
The `OAuth` class is stored in the `OAuth_io` namespace. You need to include it in your file like this (make sure you have required the Composer autoloader file) :
53+
The `OAuth` class is stored in the `OAuth_io` namespace. You need to include it in your file like this (make sure you have required the Composer autoloader file):
5754

5855
```php
5956
<?php
@@ -133,7 +130,7 @@ $request_object = $oauth->auth('the_provider', array(
133130

134131
`$request_object` is an object that allows you to perform requests (see further down to learn how to), and that contains the user's credentials.
135132

136-
*Using the session to get a request object*
133+
**Using the session to get a request object**
137134

138135
Usually, you'll want to make calls to the API several times while the user is connected to your app. Once you've authenticated the user once with a code, the session is automatically configured to work with the SDK.
139136

@@ -143,7 +140,7 @@ Thus, you just need to do this to get a request object:
143140
$request_object = $oauth->auth('the_provider');
144141
```
145142

146-
*Saving credentials to re-generate a request object*
143+
**Saving credentials to re-generate a request object**
147144

148145
You can also save the user's credentials to make requests in a cron. You can get the credentials array from a request object like this :
149146

@@ -152,7 +149,6 @@ $credentials = $request_object->getCredentials();
152149
// Here save the $credentials array for later use
153150
```
154151

155-
156152
Then, when you want to reuse these credentials, you can rebuild a $request_object from them:
157153

158154
```php

0 commit comments

Comments
 (0)
0