webauthn has been implemented in an extension

This commit is contained in:
Uwe Steinmann 2023-10-16 12:53:57 +02:00
parent 001b60184c
commit ad2e735687
7 changed files with 5 additions and 28 deletions

View File

@ -70,7 +70,6 @@ CREATE TABLE `tblUsers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` varchar(50) DEFAULT NULL,
`pwd` varchar(255) DEFAULT NULL,
`webauthn` text DEFAULT NULL,
`secret` varchar(50) DEFAULT NULL,
`fullName` varchar(100) DEFAULT NULL,
`email` varchar(70) DEFAULT NULL,

View File

@ -65,7 +65,6 @@ CREATE TABLE "tblUsers" (
"id" SERIAL UNIQUE,
"login" varchar(50) default NULL,
"pwd" varchar(255) default NULL,
"webauthn" text default NULL,
"secret" varchar(50) default NULL,
"fullName" varchar(100) default NULL,
"email" varchar(70) default NULL,

View File

@ -66,7 +66,6 @@ CREATE TABLE `tblUsers` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`login` varchar(50) default NULL,
`pwd` varchar(255) default NULL,
`webauthn` TEXT default NULL,
`secret` varchar(50) default NULL,
`fullName` varchar(100) default NULL,
`email` varchar(70) default NULL,

View File

@ -8,8 +8,6 @@ ALTER TABLE "tblUserPasswordHistory" ALTER COLUMN "pwd" varchar(255) DEFAULT NUL
ALTER TABLE "tblUserPasswordRequest" ALTER COLUMN "hash" varchar(255) DEFAULT NULL;
ALTER TABLE "tblUsers" ADD COLUMN "webauthn" TYPE text DEFAULT NULL;
ALTER TABLE "tblUsers" ADD COLUMN "disabledUntil" TYPE TIMESTAMP DEFAULT NULL;
ALTER TABLE "tblDocuments" ADD COLUMN "startdate" TIMESTAMP default NULL;

View File

@ -38,8 +38,6 @@ DROP TABLE `tblUsers`;
ALTER TABLE `new_tblUsers` RENAME TO `tblUsers`;
ALTER TABLE `tblUsers` ADD COLUMN `webauthn` TEXT DEFAULT NULL;
ALTER TABLE `tblUsers` ADD COLUMN `disabledUntil` TEXT DEFAULT NULL;
CREATE TABLE `new_tblUserPasswordRequest` (

View File

@ -8,8 +8,6 @@ ALTER TABLE `tblUserPasswordHistory` CHANGE `pwd` `pwd` varchar(255) DEFAULT NUL
ALTER TABLE `tblUserPasswordRequest` CHANGE `hash` `hash` varchar(255) DEFAULT NULL;
ALTER TABLE `tblUsers` ADD COLUMN `webauthn` text DEFAULT NULL AFTER `pwd`;
ALTER TABLE `tblUsers` ADD COLUMN `disabledUntil` datetime DEFAULT NULL AFTER `disabled`;
ALTER TABLE `tblDocuments` ADD COLUMN `enddate` datetime DEFAULT NULL AFTER `sequence`;

View File

@ -28,7 +28,6 @@ include("../inc/inc.ClassSession.php");
include("../inc/inc.DBInit.php");
include("../inc/inc.ClassUI.php");
include("../inc/inc.ClassController.php");
require_once("../inc/inc.WebAuthn.php");
include $settings->_rootDir . "languages/" . $settings->_language . "/lang.inc";
@ -92,24 +91,11 @@ $controller->setParam('sesstheme', $sesstheme);
$controller->setParam('referuri', $referuri);
$controller->setParam('session', $session);
$controller->setParam('authenticator', $authenticator);
$action = !empty($_POST['action']) ? $_POST['action'] : '';
switch($action) {
/* preparelogin() and login() are both called by ajax */
case 'preparelogin':
$controller->preparelogin();
exit();
break;
case 'login':
$controller->login();
exit();
break;
default:
if(!$controller()) {
$session = null;
add_log_line("login failed", PEAR_LOG_ERR);
_printMessage(getMLText($controller->getErrorMsg()), getMLText($controller->getErrorMsg())."\n");
exit;
}
if(!$controller()) {
$session = null;
add_log_line("login failed", PEAR_LOG_ERR);
_printMessage(getMLText($controller->getErrorMsg()), getMLText($controller->getErrorMsg())."\n");
exit;
}
$user = $controller->getUser();