Improve 2FA

This commit is contained in:
Frederic Guillot
2016-01-05 20:31:15 -05:00
parent 811254ba93
commit e62779e267
9 changed files with 191 additions and 80 deletions

View File

@@ -15,6 +15,9 @@ class TotpAuthTest extends Base
public function testGetSecret()
{
$provider = new TotpAuth($this->container);
$this->assertEmpty($provider->getSecret());
$provider->generateSecret();
$secret = $provider->getSecret();
$this->assertNotEmpty($secret);
@@ -48,7 +51,7 @@ class TotpAuthTest extends Base
{
$provider = new TotpAuth($this->container);
$secret = $provider->getSecret();
$secret = $provider->generateSecret();
$this->assertNotEmpty($secret);
$provider->setCode('1234');