Download the PHP package rijosh/podio-auth without Composer
On this page you can find all versions of the php package rijosh/podio-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rijosh/podio-auth
More information about rijosh/podio-auth
Files in rijosh/podio-auth
Package podio-auth
Short Description Podio authentication including rate-limit controlling
License MIT
Informations about the package podio-auth
Laravel-Podio Auth
Laravel-Podio library which includes
- Username and password flow
- App authentication flow
- Podio API library
- Podio rate-limit handling
- Podio app hook handling
Prerequisites
- php: ^5.3.0
- laravel/framework: ^5.2
- podio/podio-php: ^4.3
Installing
-
Install package
-
Include the
PodioAuthServiceProvider
inconfig/app.php
provider list -
Create config file
podio.php
and add the following code: - Update
podio.php
with configuration data. -
Run the following commands
This will generate the required tables and sync the api from config.
Code Examples
Use package library for authentication and Podio API
Using hook management module
The following urls can be used to manage Podio hooks.
hook/create
: Add hooks to all Podio apps listed in the config file.hook/remove
: Remove all hooks added from the application independent of the entries created inpodio_hooks
table.hook/disable
: Remove all hooks from Podio apps that listed in thepodio_hooks
table.cron/hook
: Use this url as a cron job. It will check for inactive hooks in apps and enable them.
After adding the hooks, make sure all hooks are verified. The hook url will be handle/{app_id}/hook
. All the hooks from Podio will be entered into the podio_requests
table and trigger the hook processing url. This will help to process hooks asynchronously. Follow the steps to continue with the hook processing.
- Create new controller and extend
PodioAuth\Controllers\HookController
. -
Add function to process the hooks.
- Add route for this function with name
process_hook
and method asget
.
Note
All the functionalities are working depending on the configuration data in the podio.php
file. Make sure app_auth
and client_api
are correctly synced to corresponding tables in database. Clear the configuration cache by running the command php artisan config:cache
.
Contributing
Contributions to Podio Auth library are welcome.