mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-02-21 10:08:34 +00:00
use Endroid QR Code
This commit is contained in:
parent
8ab55eb6c3
commit
09fd87c9f1
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user