Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 324dfd9d authored by Akhil's avatar Akhil
Browse files

CS fix



Signed-off-by: default avatarAkhil <akhil@e.email>
parent 469ce065
Loading
Loading
Loading
Loading
Loading
+19 −22
Original line number Diff line number Diff line
@@ -3,10 +3,10 @@
declare(strict_types=1);

namespace OCA\EcloudAccounts\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use OCA\TwoFactorTOTP\Db\TotpSecretMapper;
use OCP\Security\ICrypto;
@@ -14,7 +14,6 @@ use OCP\IDBConnection;
use OCA\EcloudAccounts\Db\SSOMapper;

class Migrate2FASecrets extends Command {

	private TotpSecretMapper $totpSecretMapper;
	private SSOMapper $SSOMapper;
	private IDBConnection $dbConn;
@@ -70,14 +69,13 @@ class Migrate2FASecrets extends Command {
			$entries[] = $this->getSSOSecretEntry($userId, $secret);
		}
		return $entries;

	}

	private function getSSOSecretEntry(string $userId, string $secret) : array {
		$SSOUserId = $this->SSOMapper->getUserId($userId);
		$credentialEntry = [
			'ID' => $this->randomUUID(),
			'SALT' => NULL,
			'SALT' => null,
			'USER_ID' => $SSOUserId,
			'USER_LABEL' => 'Murena Cloud 2FA',
			'SECRET_DATA' => [
@@ -113,5 +111,4 @@ class Migrate2FASecrets extends Command {
		// Output the 36 character UUID.
		return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
	}
	
}
+10 −12
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ use OCP\IConfig;
use OCP\ILogger;
use OCA\EcloudAccounts\Exception\DbConnectionParamsException;
use Doctrine\DBAL\DriverManager;
use Throwable;

class SSOMapper {
	private $config;
@@ -68,6 +67,5 @@ class SSOMapper {
	}

	public function insertCredentials(array $entries) {
		
	}
}