Skip to content

Commit bf2868c

Browse files
author
epriestley
committed
Rename "PhabricatorPasswordHashInterface" to "PhabricatorAuthPasswordHashInterface"
Summary: Depends on D18911. Ref T13043. Improves consistency with other "PhabricatorAuthPassword..." classes. Test Plan: Unit tests, `grep`. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13043 Differential Revision: https://secure.phabricator.com/D18916
1 parent d4b3cd5 commit bf2868c

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/__phutil_library_map__.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,6 +2094,7 @@
20942094
'PhabricatorAuthPasswordEditor' => 'applications/auth/editor/PhabricatorAuthPasswordEditor.php',
20952095
'PhabricatorAuthPasswordEngine' => 'applications/auth/engine/PhabricatorAuthPasswordEngine.php',
20962096
'PhabricatorAuthPasswordException' => 'applications/auth/password/PhabricatorAuthPasswordException.php',
2097+
'PhabricatorAuthPasswordHashInterface' => 'applications/auth/password/PhabricatorAuthPasswordHashInterface.php',
20972098
'PhabricatorAuthPasswordPHIDType' => 'applications/auth/phid/PhabricatorAuthPasswordPHIDType.php',
20982099
'PhabricatorAuthPasswordQuery' => 'applications/auth/query/PhabricatorAuthPasswordQuery.php',
20992100
'PhabricatorAuthPasswordResetTemporaryTokenType' => 'applications/auth/tokentype/PhabricatorAuthPasswordResetTemporaryTokenType.php',
@@ -3496,7 +3497,6 @@
34963497
'PhabricatorPassphraseApplication' => 'applications/passphrase/application/PhabricatorPassphraseApplication.php',
34973498
'PhabricatorPasswordAuthProvider' => 'applications/auth/provider/PhabricatorPasswordAuthProvider.php',
34983499
'PhabricatorPasswordDestructionEngineExtension' => 'applications/auth/extension/PhabricatorPasswordDestructionEngineExtension.php',
3499-
'PhabricatorPasswordHashInterface' => 'applications/auth/password/PhabricatorPasswordHashInterface.php',
35003500
'PhabricatorPasswordHasher' => 'infrastructure/util/password/PhabricatorPasswordHasher.php',
35013501
'PhabricatorPasswordHasherTestCase' => 'infrastructure/util/password/__tests__/PhabricatorPasswordHasherTestCase.php',
35023502
'PhabricatorPasswordHasherUnavailableException' => 'infrastructure/util/password/PhabricatorPasswordHasherUnavailableException.php',
@@ -9997,7 +9997,7 @@
99979997
'PhabricatorFulltextInterface',
99989998
'PhabricatorFerretInterface',
99999999
'PhabricatorConduitResultInterface',
10000-
'PhabricatorPasswordHashInterface',
10000+
'PhabricatorAuthPasswordHashInterface',
1000110001
),
1000210002
'PhabricatorUserBadgesCacheType' => 'PhabricatorUserCacheType',
1000310003
'PhabricatorUserBlurbField' => 'PhabricatorUserCustomField',

src/applications/auth/engine/PhabricatorAuthPasswordEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function getContentSource() {
2727
return $this->contentSource;
2828
}
2929

30-
public function setObject(PhabricatorPasswordHashInterface $object) {
30+
public function setObject(PhabricatorAuthPasswordHashInterface $object) {
3131
$this->object = $object;
3232
return $this;
3333
}

src/applications/auth/password/PhabricatorPasswordHashInterface.php renamed to src/applications/auth/password/PhabricatorAuthPasswordHashInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
interface PhabricatorPasswordHashInterface {
3+
interface PhabricatorAuthPasswordHashInterface {
44

55
public function newPasswordDigest(
66
PhutilOpaqueEnvelope $envelope,

src/applications/auth/storage/PhabricatorAuthPassword.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class PhabricatorAuthPassword
2121
const PASSWORD_TYPE_TEST = 'test';
2222

2323
public static function initializeNewPassword(
24-
PhabricatorPasswordHashInterface $object,
24+
PhabricatorAuthPasswordHashInterface $object,
2525
$type) {
2626

2727
return id(new self())
@@ -80,7 +80,7 @@ public function canUpgrade() {
8080

8181
public function upgradePasswordHasher(
8282
PhutilOpaqueEnvelope $envelope,
83-
PhabricatorPasswordHashInterface $object) {
83+
PhabricatorAuthPasswordHashInterface $object) {
8484

8585
// Before we make changes, double check that this is really the correct
8686
// password. It could be really bad if we "upgraded" a password and changed
@@ -98,15 +98,15 @@ public function upgradePasswordHasher(
9898

9999
public function setPassword(
100100
PhutilOpaqueEnvelope $password,
101-
PhabricatorPasswordHashInterface $object) {
101+
PhabricatorAuthPasswordHashInterface $object) {
102102

103103
$hasher = PhabricatorPasswordHasher::getBestHasher();
104104
return $this->setPasswordWithHasher($password, $object, $hasher);
105105
}
106106

107107
public function setPasswordWithHasher(
108108
PhutilOpaqueEnvelope $password,
109-
PhabricatorPasswordHashInterface $object,
109+
PhabricatorAuthPasswordHashInterface $object,
110110
PhabricatorPasswordHasher $hasher) {
111111

112112
if (!strlen($password->openEnvelope())) {
@@ -130,7 +130,7 @@ public function setPasswordWithHasher(
130130

131131
public function comparePassword(
132132
PhutilOpaqueEnvelope $password,
133-
PhabricatorPasswordHashInterface $object) {
133+
PhabricatorAuthPasswordHashInterface $object) {
134134

135135
$digest = $this->digestPassword($password, $object);
136136
$hash = $this->newPasswordEnvelope();
@@ -144,7 +144,7 @@ public function newPasswordEnvelope() {
144144

145145
private function digestPassword(
146146
PhutilOpaqueEnvelope $password,
147-
PhabricatorPasswordHashInterface $object) {
147+
PhabricatorAuthPasswordHashInterface $object) {
148148

149149
$object_phid = $object->getPHID();
150150

src/applications/people/storage/PhabricatorUser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class PhabricatorUser
2121
PhabricatorFulltextInterface,
2222
PhabricatorFerretInterface,
2323
PhabricatorConduitResultInterface,
24-
PhabricatorPasswordHashInterface {
24+
PhabricatorAuthPasswordHashInterface {
2525

2626
const SESSION_TABLE = 'phabricator_session';
2727
const NAMETOKEN_TABLE = 'user_nametoken';
@@ -1565,7 +1565,7 @@ public function getCSSValue($variable_key) {
15651565
return $variables[$variable_key];
15661566
}
15671567

1568-
/* -( PhabricatorPasswordHashInterface )----------------------------------- */
1568+
/* -( PhabricatorAuthPasswordHashInterface )------------------------------- */
15691569

15701570

15711571
public function newPasswordDigest(

0 commit comments

Comments
 (0)