-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathauthentication.php
32 lines (27 loc) · 1.02 KB
/
authentication.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
require_once(INCLUDE_DIR.'class.plugin.php');
require_once('config.php');
class OauthAuthPlugin extends Plugin {
var $config_class = "OauthPluginConfig";
function bootstrap() {
$config = $this->getConfig();
# ----- Google Plus ---------------------
$google = $config->get('g-enabled');
if (in_array($google, array('all', 'staff'))) {
require_once('google.php');
StaffAuthenticationBackend::register(
new GoogleStaffAuthBackend($this->getConfig()));
}
if (in_array($google, array('all', 'client'))) {
require_once('google.php');
UserAuthenticationBackend::register(
new GoogleClientAuthBackend($this->getConfig()));
}
}
}
require_once(INCLUDE_DIR.'UniversalClassLoader.php');
use Symfony\Component\ClassLoader\UniversalClassLoader_osTicket;
$loader = new UniversalClassLoader_osTicket();
$loader->registerNamespaceFallbacks(array(
dirname(__file__).'/lib'));
$loader->register();