2017-01-21 04:24:30 +05:30
|
|
|
<?php
|
|
|
|
namespace tests\codeception\api\_pages;
|
|
|
|
|
|
|
|
use yii\codeception\BasePage;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property \tests\codeception\api\FunctionalTester $actor
|
|
|
|
*/
|
|
|
|
class TwoFactorAuthRoute extends BasePage {
|
|
|
|
|
2017-01-23 04:37:29 +05:30
|
|
|
public $route = '/two-factor-auth';
|
|
|
|
|
2017-01-21 04:24:30 +05:30
|
|
|
public function credentials() {
|
|
|
|
$this->actor->sendGET($this->getUrl());
|
|
|
|
}
|
|
|
|
|
2017-09-06 22:47:52 +05:30
|
|
|
public function enable($totp = null, $password = null) {
|
2017-01-23 04:37:29 +05:30
|
|
|
$this->actor->sendPOST($this->getUrl(), [
|
2017-09-06 22:47:52 +05:30
|
|
|
'totp' => $totp,
|
2017-01-23 04:37:29 +05:30
|
|
|
'password' => $password,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2017-09-06 22:47:52 +05:30
|
|
|
public function disable($totp = null, $password = null) {
|
2017-01-23 04:37:29 +05:30
|
|
|
$this->actor->sendDELETE($this->getUrl(), [
|
2017-09-06 22:47:52 +05:30
|
|
|
'totp' => $totp,
|
2017-01-23 04:37:29 +05:30
|
|
|
'password' => $password,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2017-01-21 04:24:30 +05:30
|
|
|
}
|