Download the PHP package soatok/patreon without Composer
On this page you can find all versions of the php package soatok/patreon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download soatok/patreon
More information about soatok/patreon
Files in soatok/patreon
Package patreon
Short Description Interact with the Patreon API via OAuth.
License Apache-2.0
Informations about the package patreon
patreon-php
This is Soatok's fork of the Patreon-PHP library.
Interact with the Patreon API (version 2) via OAuth. Requires PHP 7.
Differences Between This Library and Patreon's
- This library requires PHP 7 or newer, Patreon's only requires PHP 5.3.
- This library loads in the hidden-string package (which prevents secrets from leaking in stack traces) and the sodium_compat package (used to make sure if libsodium is available-- even in a weird way-- it will be accessible in the standardized PHP 7.2+ API).
- This library uses BLAKE2b for response caching instead of MD5 (if possible).
- This library features the new
Patreon\AuthUrl
class which generates an authentication URL without having to manually URL-encode and concatenate strings.- This should make it even easier for PHP developers to integrate with Patreon via OAuth.
Installation
Get the plugin from Packagist:
Although it's possible to load this library without using Composer, it's highly recommended that you use Composer.
Soatok will not support non-Composer installs.
Usage
Step 1. Get your client_id and client_secret
Visit the Patreon platform documentation page while logged in as a Patreon creator to register your client.
This will provide you with a client_id
and a client_secret
.
Step 2. Use this plugin in your code
Let's say you wanted to make a "Log In with Patreon" button.
You've read through the directions, and are trying to implement "Step 2: Handling the OAuth Redirect" with your server.
The user will be arriving at one of your pages after you have sent them to
the authorize page for step 1, so in their query
parameters landing on this page, they will have a parameter 'code'
.
(If you are doing something other than the "Log In with Patreon" flow, please see the examples folder for more examples.)
(Especially the unified flow is a great way to have users unlock locked features or content at your site or app - it allows users to register, login, pledge and return to your app in one smooth unified flow. Check it out in the examples folder.)
All versions of patreon with dependencies
paragonie/certainty Version ^2
paragonie/hidden-string Version ^1
paragonie/sodium_compat Version ^1
ext-curl Version *
ext-json Version *