summaryrefslogtreecommitdiff
path: root/common.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-05-03 22:24:03 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-05-03 22:24:03 -0400
commit560a12f0bd6347a335f8ed5201d6d9562d03d4bc (patch)
tree00510d25c1cf5e747573543fa88d44ef003b1c9a /common.php
parent9531e439cd99fb7dbcfb039f422f1d1ba414ec30 (diff)
Add Google authentication
Diffstat (limited to 'common.php')
-rw-r--r--common.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/common.php b/common.php
index 4f09c121..7f2826de 100644
--- a/common.php
+++ b/common.php
@@ -6,7 +6,7 @@ require __DIR__.'/core/translator.php';
$registry = new Core\Registry;
-$registry->db_version = 13;
+$registry->db_version = 14;
$registry->db = function() use ($registry) {
require __DIR__.'/vendor/PicoDb/Database.php';
@@ -105,6 +105,11 @@ $registry->lastLogin = function() use ($registry) {
return new \Model\LastLogin($registry->shared('db'), $registry->shared('event'));
};
+$registry->google = function() use ($registry) {
+ require_once __DIR__.'/models/google.php';
+ return new \Model\Google($registry->shared('db'), $registry->shared('event'));
+};
+
if (file_exists('config.php')) require 'config.php';
// Auto-refresh frequency in seconds for the public board view
@@ -136,3 +141,8 @@ defined('LDAP_AUTH') or define('LDAP_AUTH', false);
defined('LDAP_SERVER') or define('LDAP_SERVER', '');
defined('LDAP_PORT') or define('LDAP_PORT', 389);
defined('LDAP_USER_DN') or define('LDAP_USER_DN', '%s');
+
+// Google authentication
+defined('GOOGLE_AUTH') or define('GOOGLE_AUTH', false);
+defined('GOOGLE_CLIENT_ID') or define('GOOGLE_CLIENT_ID', '');
+defined('GOOGLE_CLIENT_SECRET') or define('GOOGLE_CLIENT_SECRET', '');