X-Git-Url: https://git-public.kairo.at/?p=authserver.git;a=blobdiff_plain;f=app%2Fauthsystem.inc.php;h=7f3b783c07a6a9a900cc9fb6925d7351a5d6cd0c;hp=ac5469b416743c35f12dc1a1be66e9d829b5466d;hb=3875e0fb8b2b31d82809bd20880f1d206db4cb2c;hpb=9ea26dfc3c7c7e7144a90f858b2b7f22cb44add8 diff --git a/app/authsystem.inc.php b/app/authsystem.inc.php index ac5469b..7f3b783 100644 --- a/app/authsystem.inc.php +++ b/app/authsystem.inc.php @@ -3,13 +3,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* - Some resources for how to store passwords: - - https://blog.mozilla.org/webdev/2012/06/08/lets-talk-about-password-storage/ - - https://wiki.mozilla.org/WebAppSec/Secure_Coding_Guidelines - oauth-server-php: https://bshaffer.github.io/oauth2-server-php-docs/cookbook -*/ - // error reporting (for testing) ini_set('display_errors', 1); error_reporting(E_ALL); @@ -35,46 +28,6 @@ catch (Exception $e) { $utils->setUpL10n(); -// Sanitize settings. -$settings['piwik_enabled'] = (@$settings['piwik_enabled']) ? true : false; -$settings['piwik_site_id'] = intval(@$settings['piwik_site_id']); -$settings['piwik_url'] = strlen(@$settings['piwik_url']) ? $settings['piwik_url'] : '/piwik/'; -$settings['piwik_tracker_path'] = strlen(@$settings['piwik_tracker_path']) ? $settings['piwik_tracker_path'] : '../vendor/piwik/piwik-php-tracker/'; - -/* Creating the DB tables: -CREATE TABLE `auth_sessions` ( - `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT , - `sesskey` VARCHAR(150) NOT NULL DEFAULT '' , - `user` MEDIUMINT UNSIGNED NULL DEFAULT NULL , - `logged_in` BOOLEAN NOT NULL DEFAULT FALSE , - `time_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , - `time_expire` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , - `saved_redirect` VARCHAR(255) NOT NULL DEFAULT '' , - PRIMARY KEY (`id`), - INDEX (`sesskey`), - INDEX (`time_expire`) -); -CREATE TABLE `auth_users` ( - `id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT , - `email` VARCHAR(255) NOT NULL , - `pwdhash` VARCHAR(255) NOT NULL , - `status` ENUM('unverified','ok') NOT NULL DEFAULT 'unverified' , - `verify_hash` VARCHAR(150) NULL DEFAULT NULL , - `group_id` MEDIUMINT UNSIGNED DEFAULT '0' , - PRIMARY KEY (`id`), - UNIQUE (`email`) -); -CREATE TABLE `auth_log` ( - `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT , - `code` VARCHAR(100) NOT NULL , - `info` TEXT NULL DEFAULT NULL , - `ip_addr` VARCHAR(50) NULL DEFAULT NULL , - `time_logged` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , - PRIMARY KEY (`id`), - INDEX (`time_logged`) -); -*/ - // Set up our OAuth2 Server object $server = $utils->getOAuthServer(); ?>