Download the PHP package cloudadic/twin23-oauth2-php-sdk without Composer
On this page you can find all versions of the php package cloudadic/twin23-oauth2-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package twin23-oauth2-php-sdk
Twin23 OAuth 2.0 Client
This package makes it simple to integrate your application with Twin23 OAuth 2.0 service.
This package is compliant with PSR-1, PSR-2, PSR-4, and PSR-7. If you notice compliance oversights, please send a patch via pull request. If you're interesting in contributing to this library, please take a look at our contributing guidelines.
Requirements
The following versions of PHP are supported.
- PHP 5.5
- PHP 5.6
- PHP 7.0
- PHP 7.1
- HHVM
Install
Via Composer
OR
Add the following line to your composer.json
Authorization Code Grant
The authorization code grant type is the most common grant type used when authenticating users with a third-party service. This grant type utilizes a client (this library), a server (the service provider), and a resource owner (the user with credentials to a protected—or owned—resource) to request access to resources owned by the user. This is often referred to as 3-legged OAuth, since there are three parties involved.
Now, for users who you don't have an account on Twin23, they'll be asked to put in their user info. Once fill out the form they are good to get logged-in.
Here's how you can configure your client.
Generate Authorization URL
Generate Access Token
Refreshing a Token
Once your application is authorized, you can refresh an expired token using a refresh token rather than going through the entire process of obtaining a brand new token. To do so, simply reuse this refresh token from your data store to request a refresh.
Get Identity Info
License
The MIT License (MIT). Please see License File for more information.