Enabled OAuth/OAuth2 logins
This commit is contained in:
3
modules/oauth/classes/OAuth/API.php
Normal file
3
modules/oauth/classes/OAuth/API.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
abstract class OAuth_API extends Kohana_OAuth_API {}
|
3
modules/oauth/classes/OAuth/API/Profile/Linkedin.php
Normal file
3
modules/oauth/classes/OAuth/API/Profile/Linkedin.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_API_Profile_Linkedin extends Kohana_OAuth_API_Profile_Linkedin {}
|
3
modules/oauth/classes/OAuth/Consumer.php
Normal file
3
modules/oauth/classes/OAuth/Consumer.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Consumer extends Kohana_OAuth_Consumer { }
|
19
modules/oauth/classes/OAuth/Plugin.php
Normal file
19
modules/oauth/classes/OAuth/Plugin.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides 3rd party plugin authentication
|
||||
*
|
||||
* @package OAuth
|
||||
* @category Plugins
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
abstract class OAuth_Plugin {
|
||||
protected $oo; // Our OAuth Object
|
||||
|
||||
public function __construct(Model_Oauth $oo) {
|
||||
$this->oo = $oo;
|
||||
}
|
||||
}
|
||||
?>
|
51
modules/oauth/classes/OAuth/Plugin/Facebook.php
Normal file
51
modules/oauth/classes/OAuth/Plugin/Facebook.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Facebook Authentication
|
||||
*
|
||||
* @package OAuth
|
||||
* @category Plugins
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
|
||||
class OAuth_Plugin_Facebook extends OAuth_Plugin {
|
||||
public function html() {
|
||||
// @todo Needs to work with https
|
||||
Script::factory()
|
||||
->type('src')
|
||||
->data('http://connect.facebook.net/en_US/all.js');
|
||||
|
||||
Script::factory()
|
||||
->type('stdin')
|
||||
->data('
|
||||
$(document).ready(function(){
|
||||
window.fbAsyncInit = function() {
|
||||
// Initialize the Facebook JavaScript SDK
|
||||
FB.init({
|
||||
appId: '.$this->oo->app_id.',
|
||||
xfbml: false,
|
||||
status: true,
|
||||
cookie: true,
|
||||
});
|
||||
|
||||
// Check if the current user is logged in and has authorized the app
|
||||
//FB.getLoginStatus(checkLoginStatus);
|
||||
}
|
||||
|
||||
$(".btn-facebook").click(function() {
|
||||
FB.login(checkLoginStatus, {scope:"email"});
|
||||
|
||||
// We stop the click, but pick up the href in the javascript
|
||||
return false;
|
||||
});
|
||||
});
|
||||
');
|
||||
|
||||
Script::factory()
|
||||
->type('file')
|
||||
->data('media/js/facebook.js');
|
||||
}
|
||||
}
|
||||
?>
|
17
modules/oauth/classes/OAuth/Plugin/Google.php
Normal file
17
modules/oauth/classes/OAuth/Plugin/Google.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Facebook Authentication
|
||||
*
|
||||
* @package OAuth
|
||||
* @category Plugins
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
|
||||
class OAuth_Plugin_Google extends OAuth_Plugin {
|
||||
public function html() {
|
||||
}
|
||||
}
|
||||
?>
|
17
modules/oauth/classes/OAuth/Plugin/Linkedin.php
Normal file
17
modules/oauth/classes/OAuth/Plugin/Linkedin.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Facebook Authentication
|
||||
*
|
||||
* @package OAuth
|
||||
* @category Plugins
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
|
||||
class OAuth_Plugin_Linkedin extends OAuth_Plugin {
|
||||
public function html() {
|
||||
}
|
||||
}
|
||||
?>
|
3
modules/oauth/classes/OAuth/Provider.php
Normal file
3
modules/oauth/classes/OAuth/Provider.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
abstract class OAuth_Provider extends Kohana_OAuth_Provider { }
|
3
modules/oauth/classes/OAuth/Provider/Linkedin.php
Normal file
3
modules/oauth/classes/OAuth/Provider/Linkedin.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Provider_Linkedin extends Kohana_OAuth_Provider_Linkedin { }
|
3
modules/oauth/classes/OAuth/Request.php
Normal file
3
modules/oauth/classes/OAuth/Request.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
abstract class OAuth_Request extends Kohana_OAuth_Request { }
|
3
modules/oauth/classes/OAuth/Request/Access.php
Normal file
3
modules/oauth/classes/OAuth/Request/Access.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Request_Access extends Kohana_OAuth_Request_Access { }
|
3
modules/oauth/classes/OAuth/Request/Authorize.php
Normal file
3
modules/oauth/classes/OAuth/Request/Authorize.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Request_Authorize extends Kohana_OAuth_Request_Authorize { }
|
3
modules/oauth/classes/OAuth/Request/Resource.php
Normal file
3
modules/oauth/classes/OAuth/Request/Resource.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Request_Resource extends Kohana_OAuth_Request_Resource { }
|
3
modules/oauth/classes/OAuth/Request/Token.php
Normal file
3
modules/oauth/classes/OAuth/Request/Token.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Request_Token extends Kohana_OAuth_Request_Token { }
|
3
modules/oauth/classes/OAuth/Response.php
Normal file
3
modules/oauth/classes/OAuth/Response.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Response extends Kohana_OAuth_Response { }
|
3
modules/oauth/classes/OAuth/Signature.php
Normal file
3
modules/oauth/classes/OAuth/Signature.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
abstract class OAuth_Signature extends Kohana_OAuth_Signature { }
|
3
modules/oauth/classes/OAuth/Signature/HMAC/SHA1.php
Normal file
3
modules/oauth/classes/OAuth/Signature/HMAC/SHA1.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Signature_HMAC_SHA1 extends Kohana_OAuth_Signature_HMAC_SHA1 { }
|
3
modules/oauth/classes/OAuth/Signature/Plaintext.php
Normal file
3
modules/oauth/classes/OAuth/Signature/Plaintext.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Signature_PLAINTEXT extends Kohana_OAuth_Signature_PLAINTEXT { }
|
3
modules/oauth/classes/OAuth/Token.php
Normal file
3
modules/oauth/classes/OAuth/Token.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
abstract class OAuth_Token extends Kohana_OAuth_Token { }
|
3
modules/oauth/classes/OAuth/Token/Access.php
Normal file
3
modules/oauth/classes/OAuth/Token/Access.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Token_Access extends Kohana_OAuth_Token_Access { }
|
3
modules/oauth/classes/OAuth/Token/Request.php
Normal file
3
modules/oauth/classes/OAuth/Token/Request.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
|
||||
class OAuth_Token_Request extends Kohana_OAuth_Token_Request { }
|
Reference in New Issue
Block a user