Skip to content

Commit

Permalink
Merge pull request #18 from YouweGit/feature/change-route
Browse files Browse the repository at this point in the history
change routes
  • Loading branch information
kaplansin authored Jan 2, 2024
2 parents 58894a0 + 73eaea0 commit b212385
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions Api/TfaCheckInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
interface TfaCheckInterface
{

const FRONTEND_2_FA_ACCOUNT_SETUP_ROUTE = 'customer_account_setup';
const FRONTEND_2_FA_ACCOUNT_AUTHENTICATE_ROUTE = 'customer_account_authenticate';
const FRONTEND_2_FA_ACCOUNT_SETUP_ROUTE = 'customer_account_setuptfa';
const FRONTEND_2_FA_ACCOUNT_AUTHENTICATE_ROUTE = 'customer_account_authenticatetfa';
const CUSTOMER_ACCOUNT_LOGOUT_ROUTE = 'customer_account_logout';
const FRONTEND_2_FA_ACCOUNT_SETUP_PATH = 'customer/account/setup';
const FRONTEND_2_FA_ACCOUNT_AUTHENTICATE_PATH = 'customer/account/authenticate';
const FRONTEND_2_FA_ACCOUNT_SETUP_PATH = 'customer/account/setuptfa';
const FRONTEND_2_FA_ACCOUNT_AUTHENTICATE_PATH = 'customer/account/authenticatetfa';

public function isCustomerInForced2faGroup(\Magento\Customer\Model\Customer $customer): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Magento\Framework\Url\DecoderInterface;
use Psr\Log\LoggerInterface;

class Authenticate extends \Magento\Framework\App\Action\Action
class AuthenticateTfa extends \Magento\Framework\App\Action\Action
{
/**
* @var \Neyamtux\Authenticator\Lib\PHPGangsta\GoogleAuthenticator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Magento\Framework\App\RequestInterface;
use Magento\Framework\View\LayoutFactory;

class Setup extends \Magento\Framework\App\Action\Action
class SetupTfa extends \Magento\Framework\App\Action\Action
{
/**
* @var \Magento\Customer\Model\Session
Expand Down Expand Up @@ -85,7 +85,7 @@ public function execute()
$this->messageManager->addErrorMessage(
__('Invalid 2FA Authentication Code')
);
$this->_redirect('frontend2fa/account/setup');
$this->_redirect('customer/account/setuptfa');
}

return;
Expand Down
4 changes: 2 additions & 2 deletions view/frontend/layout/customer_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<referenceBlock name="customer_account_navigation">
<block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-2fa-frontend">
<arguments>
<argument name="path" xsi:type="string">frontend2fa/account/setup</argument>
<argument name="path" xsi:type="string">customer/account/setuptfa</argument>
<argument name="label" xsi:type="string" translate="true">Two-Factor Authentication</argument>
<argument name="sortOrder" xsi:type="number">40</argument>
</arguments>
</block>
</referenceBlock>
</body>
</page>
</page>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<update handle="customer_account"/>
<body>
<referenceContainer name="content">
<block template="Elgentos_Frontend2FA::authenticate.phtml" class="Elgentos\Frontend2FA\Block\Authenticator" name="authenticate" cacheable="false" />
<block template="Elgentos_Frontend2FA::authenticatetfa.phtml" class="Elgentos\Frontend2FA\Block\Authenticator" name="authenticate" cacheable="false" />
</referenceContainer>
<referenceBlock name="root">
<action method="setHeaderTitle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<update handle="customer_account"/>
<body>
<referenceContainer name="content">
<block template="Elgentos_Frontend2FA::setup.phtml" class="Elgentos\Frontend2FA\Block\Authenticator" name="setup" cacheable="false" />
<block template="Elgentos_Frontend2FA::setuptfa.phtml" class="Elgentos\Frontend2FA\Block\Authenticator" name="setup" cacheable="false" />
</referenceContainer>
<referenceBlock name="root">
<action method="setHeaderTitle">
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit b212385

Please sign in to comment.