mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Rename the PhabricatorAuthFactorTOTP
class for consistency
Summary: Ref T5655. Test Plan: `grep` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T5655 Differential Revision: https://secure.phabricator.com/D11191
This commit is contained in:
parent
7c124d7854
commit
f2e87aad89
3 changed files with 7 additions and 7 deletions
|
@ -1327,8 +1327,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorAuthEditController' => 'applications/auth/controller/config/PhabricatorAuthEditController.php',
|
'PhabricatorAuthEditController' => 'applications/auth/controller/config/PhabricatorAuthEditController.php',
|
||||||
'PhabricatorAuthFactor' => 'applications/auth/factor/PhabricatorAuthFactor.php',
|
'PhabricatorAuthFactor' => 'applications/auth/factor/PhabricatorAuthFactor.php',
|
||||||
'PhabricatorAuthFactorConfig' => 'applications/auth/storage/PhabricatorAuthFactorConfig.php',
|
'PhabricatorAuthFactorConfig' => 'applications/auth/storage/PhabricatorAuthFactorConfig.php',
|
||||||
'PhabricatorAuthFactorTOTP' => 'applications/auth/factor/PhabricatorAuthFactorTOTP.php',
|
|
||||||
'PhabricatorAuthFactorTOTPTestCase' => 'applications/auth/factor/__tests__/PhabricatorAuthFactorTOTPTestCase.php',
|
|
||||||
'PhabricatorAuthFinishController' => 'applications/auth/controller/PhabricatorAuthFinishController.php',
|
'PhabricatorAuthFinishController' => 'applications/auth/controller/PhabricatorAuthFinishController.php',
|
||||||
'PhabricatorAuthHighSecurityRequiredException' => 'applications/auth/exception/PhabricatorAuthHighSecurityRequiredException.php',
|
'PhabricatorAuthHighSecurityRequiredException' => 'applications/auth/exception/PhabricatorAuthHighSecurityRequiredException.php',
|
||||||
'PhabricatorAuthHighSecurityToken' => 'applications/auth/data/PhabricatorAuthHighSecurityToken.php',
|
'PhabricatorAuthHighSecurityToken' => 'applications/auth/data/PhabricatorAuthHighSecurityToken.php',
|
||||||
|
@ -2472,6 +2470,8 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSystemRemoveWorkflow' => 'applications/system/management/PhabricatorSystemRemoveWorkflow.php',
|
'PhabricatorSystemRemoveWorkflow' => 'applications/system/management/PhabricatorSystemRemoveWorkflow.php',
|
||||||
'PhabricatorSystemSelectEncodingController' => 'applications/system/controller/PhabricatorSystemSelectEncodingController.php',
|
'PhabricatorSystemSelectEncodingController' => 'applications/system/controller/PhabricatorSystemSelectEncodingController.php',
|
||||||
'PhabricatorSystemSelectHighlightController' => 'applications/system/controller/PhabricatorSystemSelectHighlightController.php',
|
'PhabricatorSystemSelectHighlightController' => 'applications/system/controller/PhabricatorSystemSelectHighlightController.php',
|
||||||
|
'PhabricatorTOTPAuthFactor' => 'applications/auth/factor/PhabricatorTOTPAuthFactor.php',
|
||||||
|
'PhabricatorTOTPAuthFactorTestCase' => 'applications/auth/factor/__tests__/PhabricatorTOTPAuthFactorTestCase.php',
|
||||||
'PhabricatorTaskmasterDaemon' => 'infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php',
|
'PhabricatorTaskmasterDaemon' => 'infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php',
|
||||||
'PhabricatorTestApplication' => 'applications/base/controller/__tests__/PhabricatorTestApplication.php',
|
'PhabricatorTestApplication' => 'applications/base/controller/__tests__/PhabricatorTestApplication.php',
|
||||||
'PhabricatorTestCase' => 'infrastructure/testing/PhabricatorTestCase.php',
|
'PhabricatorTestCase' => 'infrastructure/testing/PhabricatorTestCase.php',
|
||||||
|
@ -4479,8 +4479,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorAuthEditController' => 'PhabricatorAuthProviderConfigController',
|
'PhabricatorAuthEditController' => 'PhabricatorAuthProviderConfigController',
|
||||||
'PhabricatorAuthFactor' => 'Phobject',
|
'PhabricatorAuthFactor' => 'Phobject',
|
||||||
'PhabricatorAuthFactorConfig' => 'PhabricatorAuthDAO',
|
'PhabricatorAuthFactorConfig' => 'PhabricatorAuthDAO',
|
||||||
'PhabricatorAuthFactorTOTP' => 'PhabricatorAuthFactor',
|
|
||||||
'PhabricatorAuthFactorTOTPTestCase' => 'PhabricatorTestCase',
|
|
||||||
'PhabricatorAuthFinishController' => 'PhabricatorAuthController',
|
'PhabricatorAuthFinishController' => 'PhabricatorAuthController',
|
||||||
'PhabricatorAuthHighSecurityRequiredException' => 'Exception',
|
'PhabricatorAuthHighSecurityRequiredException' => 'Exception',
|
||||||
'PhabricatorAuthLinkController' => 'PhabricatorAuthController',
|
'PhabricatorAuthLinkController' => 'PhabricatorAuthController',
|
||||||
|
@ -5710,6 +5708,8 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSystemRemoveWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorSystemRemoveWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
'PhabricatorSystemSelectEncodingController' => 'PhabricatorController',
|
'PhabricatorSystemSelectEncodingController' => 'PhabricatorController',
|
||||||
'PhabricatorSystemSelectHighlightController' => 'PhabricatorController',
|
'PhabricatorSystemSelectHighlightController' => 'PhabricatorController',
|
||||||
|
'PhabricatorTOTPAuthFactor' => 'PhabricatorAuthFactor',
|
||||||
|
'PhabricatorTOTPAuthFactorTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorTaskmasterDaemon' => 'PhabricatorDaemon',
|
'PhabricatorTaskmasterDaemon' => 'PhabricatorDaemon',
|
||||||
'PhabricatorTestApplication' => 'PhabricatorApplication',
|
'PhabricatorTestApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorTestCase' => 'ArcanistPhutilTestCase',
|
'PhabricatorTestCase' => 'ArcanistPhutilTestCase',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorAuthFactorTOTP extends PhabricatorAuthFactor {
|
final class PhabricatorTOTPAuthFactor extends PhabricatorAuthFactor {
|
||||||
|
|
||||||
const TEMPORARY_TOKEN_TYPE = 'mfa:totp:key';
|
const TEMPORARY_TOKEN_TYPE = 'mfa:totp:key';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorAuthFactorTOTPTestCase extends PhabricatorTestCase {
|
final class PhabricatorTOTPAuthFactorTestCase extends PhabricatorTestCase {
|
||||||
|
|
||||||
public function testTOTPCodeGeneration() {
|
public function testTOTPCodeGeneration() {
|
||||||
$tests = array(
|
$tests = array(
|
||||||
|
@ -32,7 +32,7 @@ final class PhabricatorAuthFactorTOTPTestCase extends PhabricatorTestCase {
|
||||||
list($key, $time, $code) = $test;
|
list($key, $time, $code) = $test;
|
||||||
$this->assertEqual(
|
$this->assertEqual(
|
||||||
$code,
|
$code,
|
||||||
PhabricatorAuthFactorTOTP::getTOTPCode(
|
PhabricatorTOTPAuthFactor::getTOTPCode(
|
||||||
new PhutilOpaqueEnvelope($key),
|
new PhutilOpaqueEnvelope($key),
|
||||||
$time));
|
$time));
|
||||||
}
|
}
|
Loading…
Reference in a new issue