Реализован метод для запроса информации для активации двухфакторной аутентификации

Добавлен валидатор для TOTP кодов
This commit is contained in:
ErickSkrauch
2017-01-21 01:54:30 +03:00
parent bb1fd1a960
commit 3b9ef7ea70
10 changed files with 351 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<?php
use console\db\Migration;
class m170118_224937_account_otp_secrets extends Migration {
public function safeUp() {
$this->addColumn('{{%accounts}}', 'otp_secret', $this->string()->after('registration_ip'));
$this->addColumn('{{%accounts}}', 'is_otp_enabled', $this->boolean()->notNull()->defaultValue(false)->after('otp_secret'));
}
public function safeDown() {
$this->dropColumn('{{%accounts}}', 'otp_secret');
$this->dropColumn('{{%accounts}}', 'is_otp_enabled');
}
}