Download the PHP package uzyn/cakephp-opauth without Composer
On this page you can find all versions of the php package uzyn/cakephp-opauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uzyn/cakephp-opauth
More information about uzyn/cakephp-opauth
Files in uzyn/cakephp-opauth
Package cakephp-opauth
Short Description Opauth plugin for CakePHP v2.x, allowing simple plug-n-play 3rd-party authentication with CakePHP
License MIT
Homepage http://opauth.org
Informations about the package cakephp-opauth
CakePHP plugin for Opauth
CakePHP 2.x plugin for Opauth.
Opauth is a multi-provider authentication framework.
Requirements
CakePHP v2.x
Opauth >= v0.2 (submoduled with this package)
Using Composer?
You can install CakePHP-Opauth plugin directly from Composer at uzyn/cakephp-opauth.
It works for Opauth strategies too!
View notes and Composer-enabled plugin code at composer branch.
Tutorial & sample app
Check out CakePHP bakery for tutorial and the sample branch for a quick sample app.
How to use
-
Install this plugin for your CakePHP app.
AssumingAPP
is the directory where your CakePHP app resides, it's usuallyapp/
from the base of CakePHP. -
Download Opauth library as a submodule.
-
Add this line to the bottom of your app's
Config/bootstrap.php
:Overwrite any Opauth configurations you want after the above line.
-
Load strategies onto
Strategy/
directory.Append configuration for strategies at your app's
Config/bootstrap.php
as follows: -
Go to
http://path_to_your_cake_app/auth/facebook
to authenticate with Facebook, and similarly for other strategies that you have loaded. -
After validation, user will be redirected to
Router::url('/opauth-complete')
with validated auth response data retrievable available at$this->data
.To route a controller to handle the response, at your app's
Config/routes.php
, add a connector, for example:You can then work with the authentication data at, say
APP/Controller/UsersController.php
as follows:Note that this CakePHP Opauth plugin already does auth response validation for you with its results available as a boolean value at
$this->data['validated']
. - (optional) The submoduled Opauth core library may not be of the latest build, to update to the latest:
Note:
If your CakePHP app does not reside at DocumentRoot (eg. http://localhost
), but at a directory below DocumentRoot (eg. http://localhost/your-cake-app
),
add this line to your app's APP/Config/bootstrap.php
, replacing your-cake-app
with your actual path :
Issues & questions
- Discussion group: Google Groups
This is the primary channel for support, especially for user questions. - Issues: Github Issues
- Twitter: @uzyn
- Email me: [email protected]
- IRC: #opauth on Freenode
Used this plugin in your CakePHP project? Let us know!
License
The MIT License
Copyright © 2012-2013 U-Zyn Chua (http://uzyn.com)
Package building instructions
Instructions for making into a nice zipped package for download.
Consultation
U-Zyn Chua is the Principal Consultant at Zynesis Consulting, specializing in CakePHP.
Looking for PHP web development solutions or consultation? Drop me a mail.