Enhancement to Two Factor Auth (Closes #131)

This commit is contained in:
RainLoop Team 2014-04-15 01:58:27 +04:00
parent e211899c7b
commit 365a79049e
30 changed files with 359 additions and 208 deletions

View file

@ -4721,6 +4721,28 @@ class Actions
$this->getTwoFactorInfo($sEmail));
}
/**
* @return array
*/
public function DoShowTwoFactorSecret()
{
if (!$this->TwoFactorAuthProvider()->IsActive())
{
return $this->FalseResponse(__FUNCTION__);
}
$oAccount = $this->getAccountFromToken();
$sEmail = $oAccount->ParentEmailHelper();
$aResult = $this->getTwoFactorInfo($sEmail);
if (\is_array($aResult))
{
unset($aResult['BackupCodes']);
}
return $this->DefaultResponse(__FUNCTION__, $aResult);
}
/**
* @return array
*/