cleanup module
This commit is contained in:
parent
4e1e5653fb
commit
1cea1512d2
@ -17,10 +17,8 @@ namespace D3\Totp\Application\Controller\Admin;
|
||||
|
||||
use D3\Totp\Application\Model\d3totp;
|
||||
use D3\Totp\Modules\Application\Model\d3_totp_user;
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
|
||||
use OxidEsales\Eshop\Application\Model\User;
|
||||
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||
use OxidEsales\Eshop\Core\Registry;
|
||||
|
||||
@ -32,8 +30,6 @@ class d3user_totp extends AdminDetailsController
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws DBALException
|
||||
* @throws DatabaseConnectionException
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
|
@ -17,13 +17,6 @@
|
||||
|
||||
namespace D3\Totp\Application\Model\Exceptions;
|
||||
|
||||
use D3\ModCfg\Application\Model\DependencyInjectionContainer\d3DicHandler;
|
||||
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
|
||||
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
|
||||
use D3\ModCfg\Application\Model\Log\d3log;
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
|
||||
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||
|
||||
class d3totp_wrongOtpException extends StandardException
|
||||
|
@ -20,7 +20,6 @@ use BaconQrCode\Writer;
|
||||
use D3\ModCfg\Application\Model\d3database;
|
||||
use D3\Totp\Application\Model\Exceptions\d3totp_wrongOtpException;
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use Exception;
|
||||
use OTPHP\TOTP;
|
||||
use OxidEsales\Eshop\Application\Model\User;
|
||||
use OxidEsales\Eshop\Core\DatabaseProvider;
|
||||
@ -35,6 +34,7 @@ class d3totp extends BaseModel
|
||||
public $tableName = 'd3totp';
|
||||
public $userId;
|
||||
public $totp;
|
||||
protected $timeWindow = 2;
|
||||
|
||||
/**
|
||||
* d3totp constructor.
|
||||
@ -189,7 +189,7 @@ class d3totp extends BaseModel
|
||||
*/
|
||||
public function verify($totp, $seed = null)
|
||||
{
|
||||
$blVerify = $this->getTotp($seed)->verify($totp, null, 2);
|
||||
$blVerify = $this->getTotp($seed)->verify($totp, null, $this->timeWindow);
|
||||
if (false == $blVerify) {
|
||||
$oException = oxNew(d3totp_wrongOtpException::class);
|
||||
throw $oException;
|
||||
|
@ -17,11 +17,8 @@ namespace D3\Totp\Modules\Application\Model;
|
||||
|
||||
use D3\Totp\Application\Model\d3totp;
|
||||
use Doctrine\DBAL\DBALException;
|
||||
use OxidEsales\Eshop\Application\Controller\ForgotPasswordController;
|
||||
use OxidEsales\Eshop\Core\DatabaseProvider;
|
||||
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||
use OxidEsales\Eshop\Core\Registry;
|
||||
use OxidEsales\EshopCommunity\Application\Controller\Admin\UserMain;
|
||||
|
||||
class d3_totp_user extends d3_totp_user_parent
|
||||
{
|
||||
@ -29,7 +26,6 @@ class d3_totp_user extends d3_totp_user_parent
|
||||
{
|
||||
$return = parent::logout();
|
||||
|
||||
// deleting session info
|
||||
Registry::getSession()->deleteVariable(d3totp::TOTP_SESSION_VARNAME);
|
||||
|
||||
return $return;
|
||||
|
@ -33,7 +33,6 @@ class Installation extends d3install_updatebase
|
||||
'do' => 'fixIndizes'),
|
||||
);
|
||||
|
||||
// Standardwerte für checkMultiLangTables() und fixRegisterMultiLangTables()
|
||||
public $aMultiLangTables = array();
|
||||
|
||||
public $aFields = array(
|
||||
@ -98,8 +97,7 @@ class Installation extends d3install_updatebase
|
||||
)
|
||||
);
|
||||
|
||||
protected $_aRefreshMetaModuleIds = array('d3ordermanager');
|
||||
|
||||
protected $_aRefreshMetaModuleIds = array('d3totp');
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
|
@ -19,24 +19,25 @@ use D3\Totp\Setup as ModuleSetup;
|
||||
use D3\ModCfg\Application\Model\d3utils;
|
||||
use OxidEsales\Eshop\Application\Controller\Admin\LoginController;
|
||||
use OxidEsales\Eshop\Core\Utils;
|
||||
use OxidEsales\Eshop\Application\Controller as OxidController;
|
||||
use OxidEsales\Eshop\Application\Model as OxidModel;
|
||||
use OxidEsales\Eshop\Application\Component as OxidComponent;
|
||||
use OxidEsales\Eshop\Core as OxidCore;
|
||||
|
||||
/**
|
||||
* Metadata version
|
||||
*/
|
||||
$sMetadataVersion = '2.0';
|
||||
|
||||
$logo = (class_exists(d3utils::class) ? d3utils::getInstance()->getD3Logo() : 'D³');
|
||||
|
||||
$sModuleId = 'd3totp';
|
||||
/**
|
||||
* Module information
|
||||
*/
|
||||
$aModule = [
|
||||
'id' => $sModuleId,
|
||||
'title' =>
|
||||
(class_exists(d3utils::class) ? d3utils::getInstance()->getD3Logo() : 'D³') . ' Zwei-Faktor-Authentisierung / two-factor authentication',
|
||||
'title' => [
|
||||
'de' => $logo.' Zwei-Faktor-Authentisierung',
|
||||
'en' => $logo.' two-factor authentication',
|
||||
],
|
||||
'description' => [
|
||||
'de' => 'Zwei-Faktor-Authentisierung (TOTP) für OXID eSales Shop',
|
||||
'en' => 'Two-factor authentication (TOTP) for OXID eSales shop',
|
||||
|
Loading…
x
Reference in New Issue
Block a user