Enabled OAuth/OAuth2 logins
This commit is contained in:
30
modules/oauth/classes/Kohana/OAuth2/API.php
Normal file
30
modules/oauth/classes/Kohana/OAuth2/API.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* OAuth API
|
||||
*
|
||||
* @package OAuth
|
||||
* @category Classes
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
abstract class Kohana_OAuth2_API {
|
||||
/**
|
||||
* Create a new API object.
|
||||
*
|
||||
* $API = OAuth2_API::factory($name);
|
||||
*
|
||||
* @param string API type
|
||||
* @param array API options
|
||||
* @return OAuth2_API
|
||||
*/
|
||||
public static function factory(OAuth2_Provider $provider, $name, array $options = NULL)
|
||||
{
|
||||
$class = 'OAuth2_API_'.ucfirst($name).'_'.ucfirst($provider->name);
|
||||
|
||||
return new $class($options);
|
||||
}
|
||||
|
||||
} // End OAuth2_API
|
||||
?>
|
Reference in New Issue
Block a user