Enabled OAuth/OAuth2 logins
This commit is contained in:
29
modules/oauth/classes/Kohana/OAuth2/Token.php
Normal file
29
modules/oauth/classes/Kohana/OAuth2/Token.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php defined('SYSPATH') OR die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* OAuth Provider
|
||||
*
|
||||
* @package Kohana/OAuth2
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
abstract class Kohana_OAuth2_Token extends OAuth_Token {
|
||||
|
||||
/**
|
||||
* Create a new token object.
|
||||
*
|
||||
* $token = OAuth2_Token::factory($name);
|
||||
*
|
||||
* @param string token type
|
||||
* @param array token options
|
||||
* @return OAuth2_Token
|
||||
*/
|
||||
public static function factory($name, array $options = NULL)
|
||||
{
|
||||
$class = 'OAuth2_Token_'.ucfirst($name);
|
||||
|
||||
return new $class($options);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user