/** * Constructor sets up {@link $firstvar} */ public function __construct() { //OCP\Util::writeLog('OC_USER_OTP', $name.'().', OCP\Util::DEBUG); $this->mOtp = new MultiOtpDb(OCP\Config::getAppValue('user_otp', 'EncryptionKey', 'DefaultCliEncryptionKey')); if (defined('DEBUG') && DEBUG === true) { $this->mOtp->EnableVerboseLog(); } $this->mOtp->SetMaxBlockFailures(OCP\Config::getAppValue('user_otp', 'MaxBlockFailures', 6)); $this->mOtp->SetMaxEventWindow(OCP\Config::getAppValue('user_otp', 'UserTokenMaxEventWindow', 100)); }
$multiotp = new Multiotp('DefaultCliEncryptionKey', FALSE, $folder_path); } } else { if (!isset($multiotp)) { $multiotp = new Multiotp('DefaultCliEncryptionKey', $initialize_backend, $folder_path); } $multiotp->UpgradeSchemaIfNeeded(); $verbose_prefix = $multiotp->GetVerboseLogPrefix(); // for example Reply-Message := } // Initialize multiOTP options if ($enable_log) { $multiotp->EnableLog(); } if ($verbose_log) { $multiotp->EnableVerboseLog(); } if ($display_log) { $multiotp->EnableDisplayLog(); } if ($keep_local) { $multiotp->EnableKeepLocal(); } $prefix_pin = $multiotp->IsDefaultRequestPrefixPin(); if (isset($set_prefix_pin)) { $prefix_pin = $set_prefix_pin; } $multiotp->SetSourceTag($source_tag); $multiotp->SetSourceIp($source_ip); $multiotp->SetSourceMac($source_mac); $multiotp->SetCallingIp($calling_ip);