What is the project about?
This project allows an easy and smooth integration of SteemConnect OAuth 2 flow into PHP applications.
This is the base OAuth library that empowers the SteemConnect SDK for PHP, providing the authentication flow.
Also, this project is an OAuth provider built on League OAuth Client and share the same client API as other providers, making it easy to integrate on multiple-provider applications.
- Token refresh logic.
- Token encoding/decoding helpers.
- Test refactoring.
offline scope is requested, the issued access tokens will contain a
This special token can be used to issue new access tokens, commonly, after the current access token expires.
After this release, refreshing a token can be achieved in two ways:
// using an access token instance. $provider->refreshToken($token); // OR // using the refresh token string directly. $provider->refreshTokenString($refreshTokenString);
Token encode / decode helpers.
Also, since there's a need for storing the access tokens within the session or for later usage, two helpers were added to the Provider class. They are intended for encoding an access token into JSON and decoding from JSON into an access token.
// make an access token instance into a JSON string. $jsonToken = $provider->encodeToken($token); // parse a token JSON string into an access token instance. $token = $provider->decodeToken($jsonToken);
Tests were updated in order to make it simple for others to understand.
Some repeated code between tests were refactored.
Tests for the new features on this release were also created, in order to keep the library test coverage at 100%.
Documentation (readme.md) was updated to reflect the new features.
This project now is fully featured on its purpose, provide the authentication/authorization flow for SteemConnect on PHP applications.
The roadmap is basically to test for bugs and or security threats, and refactor the unit tests, even while the coverage remains complete, making tests easier to understand is always a plus in any project.
Want to contribute?
- Join the PHP discussions over the Discord PHP channel @ SteemDevs
- Contact Telegram
- Open an Issue
- Engage on the post comments.
Posted on Utopian.io - Rewarding Open Source Contributors