claromentis / opauth
Multi-provider authentication framework for PHP
Requires
- php: >=5.3.0
Suggests
- claromentis/opauth_facebook: Allows Facebook authentication
- claromentis/opauth_google: Allows Google authentication
- claromentis/opauth_live: Allows Windows Live authentication
- claromentis/opauth_twitter: Allows Twitter authentication
Replaces
- opauth/opauth: 1.x
This package is auto-updated.
Last update: 2024-12-14 21:41:25 UTC
README
Opauth is a multi-provider authentication framework for PHP.
Opauth enables PHP applications to perform user authentication really easily.
Try out Opauth for yourself at http://opauth.org
Notes on 1.0.x
1.0.x is currently under preview release and not to be used for production yet. See release notes for details.
Opauth API and functionalities are fully ready for evaluation. Please try it out and let us know what you think.
1.0.x is not backward-compatible with 0.x. See migration guide on how to migrate Opauth 0.x applications and strategies.
For current stable release, see 0.4.x.
What is Opauth?
Opauth provides a standardized interface between PHP applications and authentication providers.
Opauth as a framework provides a set of API that allows developers to create strategies that work in a predictable manner across PHP frameworks and applications.
Opauth works well with other PHP applications & frameworks.
Quick start
-
Composer require Opauth core and Opauth strategies. Add the following to your application's
composer.json
:{ "minimum-stability": "dev", "require": { "opauth/opauth": "~1.0", "opauth/facebook": "~1.0" } }
Note: While Opauth 1.0.x still is in development, your root
composer.json
will need to set its minimum-stability todev
.Install them
$ composer install
-
Configure Opauth.
Create a fileopauth.php
that is accessible athttp://localhost/opauth.php/
.<?php $config = array( 'Strategy' => array( 'Facebook' => array( 'app_id' => 'YOUR APP ID', 'app_secret' => 'YOUR APP SECRET' ) ), 'path' => '/opauth.php/' );
-
Instantiate and run Opauth
<?php $Opauth = new Opauth\Opauth\Opauth($config); try { $response = $Opauth->run(); echo "Authed as " . $response->name . " with uid" . $response->uid; } catch (OpauthException $e) { echo "Authentication error: " . $e->getMessage(); }
-
Point your browser to
http://localhost/opauth.php/facebook
to see it in action.
References
See Opauth documentations for more infomation.
Requirements
- PHP 5 (>= 5.3)
- Composer
Core contributors
We welcome your contributions to Opauth:
- Be free to submit pull requests.
- Inform Opauth community via the discussion group and/or @opauth if you have authored a new strategy, new plugin or done anything cool with Opauth.
- Join us at IRC: #opauth on Freenode for any discussions.
Issues & questions
- Discussion group: Google Groups – Primary channel for support, especially usage questions.
- Issues: Github Issues
- IRC: #opauth on Freenode
- Twitter: @opauth
License
The MIT License
Copyright © 2012-2014 U-Zyn Chua (http://uzyn.com)
Credits
- OmniAuth for Ruby – The project that inspired Opauth.
- Homenaje – The font for Opauth logo. Designed by Constanza Artigas Preller and Agustina Mingote. SIL Open Font Licence, 1.1.