This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/oauth/classes/Kohana/OAuth2.php
2013-05-27 22:10:41 +10:00

49 lines
1.1 KiB
PHP

<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* OAuth v2 class
*
* @package Kohana/OAuth2
* @category Base
* @author Kohana Team
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
* @since 3.0.7
*/
abstract class Kohana_OAuth2 extends OAuth {
/**
* Get request object
*
* @param string Request type (access, token etc)
* @param string Request method (POST, GET)
* @param string URL
* @param array Request params
* @return OAuth2_Request
*/
public function request($type, $method, $url, array $options = NULL)
{
return OAuth2_Request::factory($type, $method, $url, $options);
}
/**
* @param $name Provider name
* @param array Provider options
* @return OAuth2_Provider
*/
public function provider($name, array $options = NULL)
{
return OAuth2_Provider::factory($name, $options);
}
/**
* @param $name Token type
* @param array Token options
* @return OAuth2_Token
*/
public function token($name, array $options = NULL)
{
return OAuth2_Token::factory($name, $options);
}
}