Skip to content
Browse files

Making OAuth classes extensible, step two, renaming classes

  • Loading branch information...
1 parent 18a51b8 commit c0bcb7951b7d86db524fc950bc262d89722fcb14 @shadowhand shadowhand committed Jul 4, 2010
View
6 classes/kohana/oauth/consumer.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Consumer {
+class Kohana_OAuth_Consumer {
/**
* Create a new consumer object.
@@ -48,13 +48,13 @@ public function __construct(array $options = NULL)
{
if ( ! isset($options['key']))
{
- throw new OAuth_Exception('Required option not passed: :option',
+ throw new Kohana_OAuth_Exception('Required option not passed: :option',
array(':option' => 'key'));
}
if ( ! isset($options['secret']))
{
- throw new OAuth_Exception('Required option not passed: :option',
+ throw new Kohana_OAuth_Exception('Required option not passed: :option',
array(':option' => 'secret'));
}
View
2 classes/kohana/oauth/exception.php
@@ -8,4 +8,4 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Exception extends Kohana_Exception { }
+class Kohana_OAuth_Exception extends Kohana_Exception { }
View
2 classes/kohana/oauth/provider.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-abstract class OAuth_Provider {
+abstract class Kohana_OAuth_Provider {
/**
* Create a new provider.
View
4 classes/kohana/oauth/provider/google.php
@@ -16,7 +16,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Provider_Google extends OAuth_Provider {
+class Kohana_OAuth_Provider_Google extends OAuth_Provider {
protected $signature = 'HMAC-SHA1';
@@ -26,7 +26,7 @@ public function request_token(OAuth_Consumer $consumer, array $params = NULL)
{
// All request tokens must specify the data scope to access
// http://code.google.com/apis/accounts/docs/OAuth.html#prepScope
- throw new OAuth_Exception('Required parameter to not passed: :param', array(
+ throw new Kohana_OAuth_Exception('Required parameter to not passed: :param', array(
':param' => 'scope';
));
}
View
2 classes/kohana/oauth/provider/twitter.php
@@ -14,7 +14,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Provider_Twitter extends OAuth_Provider {
+class Kohana_OAuth_Provider_Twitter extends OAuth_Provider {
protected $signature = 'HMAC-SHA1';
View
6 classes/kohana/oauth/request.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Request {
+class Kohana_OAuth_Request {
/**
* Create a new request object.
@@ -412,15 +412,15 @@ public function sign(OAuth_Signature $signature, OAuth_Consumer $consumer, OAuth
* }
*
* @return TRUE
- * @throws OAuth_Exception
+ * @throws Kohana_OAuth_Exception
*/
public function check()
{
foreach ($this->required as $param => $required)
{
if ($required AND ! isset($this->params[$param]))
{
- throw new OAuth_Exception('Request to :url requires missing parameter ":param"', array(
+ throw new Kohana_OAuth_Exception('Request to :url requires missing parameter ":param"', array(
':url' => $this->url,
':param' => $param,
));
View
2 classes/kohana/oauth/request/access.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Request_Access extends OAuth_Request {
+class Kohana_OAuth_Request_Access extends OAuth_Request {
protected $name = 'access';
View
2 classes/kohana/oauth/request/authorize.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Request_Authorize extends OAuth_Request{
+class Kohana_OAuth_Request_Authorize extends OAuth_Request{
protected $name = 'request';
View
2 classes/kohana/oauth/request/credentials.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Request_Credentials extends OAuth_Request{
+class Kohana_OAuth_Request_Credentials extends OAuth_Request{
View
2 classes/kohana/oauth/request/resource.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Request_Resource extends OAuth_Request{
+class Kohana_OAuth_Request_Resource extends OAuth_Request{
protected $name = 'resource';
View
2 classes/kohana/oauth/request/token.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Request_Token extends OAuth_Request {
+class Kohana_OAuth_Request_Token extends OAuth_Request {
protected $name = 'request';
View
2 classes/kohana/oauth/response.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Response {
+class Kohana_OAuth_Response {
public static function factory($body)
{
View
2 classes/kohana/oauth/server.php
@@ -8,6 +8,6 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-abstract class OAuth_Server {
+abstract class Kohana_OAuth_Server {
} // End OAuth_Server
View
2 classes/kohana/oauth/signature.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-abstract class OAuth_Signature {
+abstract class Kohana_OAuth_Signature {
/**
* Create a new signature object by name.
View
4 classes/kohana/oauth/signature/hmac/sha1.php
@@ -11,7 +11,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Signature_HMAC_SHA1 extends OAuth_Signature {
+class Kohana_OAuth_Signature_HMAC_SHA1 extends OAuth_Signature {
protected $name = 'HMAC-SHA1';
@@ -47,7 +47,7 @@ public function sign(OAuth_Request $request, OAuth_Consumer $consumer, OAuth_Tok
*
* if ( ! $signature->verify($signature, $request, $consumer, $token))
* {
- * throw new OAuth_Exception('Failed to verify signature');
+ * throw new Kohana_OAuth_Exception('Failed to verify signature');
* }
*
* [!!] This method implements [OAuth 1.0 Spec 9.2.2](http://oauth.net/core/1.0/#rfc.section.9.2.2).
View
4 classes/kohana/oauth/signature/plaintext.php
@@ -9,7 +9,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Signature_PLAINTEXT extends OAuth_Signature {
+class Kohana_OAuth_Signature_PLAINTEXT extends OAuth_Signature {
protected $name = 'PLAINTEXT';
@@ -36,7 +36,7 @@ public function sign(OAuth_Request $request, OAuth_Consumer $consumer, OAuth_Tok
*
* if ( ! $signature->verify($signature, $request, $consumer, $token))
* {
- * throw new OAuth_Exception('Failed to verify signature');
+ * throw new Kohana_OAuth_Exception('Failed to verify signature');
* }
*
* [!!] This method implements [OAuth 1.0 Spec 9.4.2](http://oauth.net/core/1.0/#rfc.section.9.4.2).
View
6 classes/kohana/oauth/token.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-abstract class OAuth_Token {
+abstract class Kohana_OAuth_Token {
/**
* Create a new token object.
@@ -51,13 +51,13 @@ public function __construct(array $options = NULL)
{
if ( ! isset($options['token']))
{
- throw new OAuth_Exception('Required option not passed: :option',
+ throw new Kohana_OAuth_Exception('Required option not passed: :option',
array(':option' => 'token'));
}
if ( ! isset($options['secret']))
{
- throw new OAuth_Exception('Required option not passed: :option',
+ throw new Kohana_OAuth_Exception('Required option not passed: :option',
array(':option' => 'secret'));
}
View
2 classes/kohana/oauth/token/access.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Token_Access extends OAuth_Token {
+class Kohana_OAuth_Token_Access extends OAuth_Token {
protected $name = 'access';
View
2 classes/kohana/oauth/token/request.php
@@ -8,7 +8,7 @@
* @copyright (c) 2010 Kohana Team
* @license http://kohanaframework.org/license
*/
-class OAuth_Token_Request extends OAuth_Token {
+class Kohana_OAuth_Token_Request extends OAuth_Token {
protected $name = 'request';

0 comments on commit c0bcb79

Please sign in to comment.
Something went wrong with that request. Please try again.