use Endroid QR Code

This commit is contained in:
Uwe Steinmann 2026-02-11 12:35:18 +01:00
parent 8ab55eb6c3
commit 09fd87c9f1
2 changed files with 9 additions and 2 deletions

View File

@ -24,7 +24,7 @@ require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings);
if ($user->isGuest()) {
UI::exitError(getMLText("2_factor_auth"),getMLText("access_denied"));

View File

@ -21,6 +21,10 @@
*/
require "vendor/autoload.php";
use RobThree\Auth\TwoFactorAuth;
use RobThree\Auth\Providers\Qr\BaconQrCodeProvider;
use RobThree\Auth\Providers\Qr\EndroidQrCodeProvider;
/**
* Class which outputs the html page for ForcePasswordChange view
*
@ -80,7 +84,10 @@ $(document).ready( function() {
$this->rowStart();
$this->contentContainerStart('span6');
$tfa = new \RobThree\Auth\TwoFactorAuth('SeedDMS: '.$sitename);
/* BaconQrCodeProvider requires imagick
$tfa = new TwoFactorAuth(new BaconQrCodeProvider());
*/
$tfa = new TwoFactorAuth(new EndroidQrCodeProvider());
$oldsecret = $user->getSecret();
$secret = $tfa->createSecret();
?>