mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-31 18:01:00 +01:00
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
This commit is contained in:
parent
d4b3cd5255
commit
bf2868c070
5 changed files with 12 additions and 12 deletions
|
@ -2094,6 +2094,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorAuthPasswordEditor' => 'applications/auth/editor/PhabricatorAuthPasswordEditor.php',
|
||||
'PhabricatorAuthPasswordEngine' => 'applications/auth/engine/PhabricatorAuthPasswordEngine.php',
|
||||
'PhabricatorAuthPasswordException' => 'applications/auth/password/PhabricatorAuthPasswordException.php',
|
||||
'PhabricatorAuthPasswordHashInterface' => 'applications/auth/password/PhabricatorAuthPasswordHashInterface.php',
|
||||
'PhabricatorAuthPasswordPHIDType' => 'applications/auth/phid/PhabricatorAuthPasswordPHIDType.php',
|
||||
'PhabricatorAuthPasswordQuery' => 'applications/auth/query/PhabricatorAuthPasswordQuery.php',
|
||||
'PhabricatorAuthPasswordResetTemporaryTokenType' => 'applications/auth/tokentype/PhabricatorAuthPasswordResetTemporaryTokenType.php',
|
||||
|
@ -3496,7 +3497,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPassphraseApplication' => 'applications/passphrase/application/PhabricatorPassphraseApplication.php',
|
||||
'PhabricatorPasswordAuthProvider' => 'applications/auth/provider/PhabricatorPasswordAuthProvider.php',
|
||||
'PhabricatorPasswordDestructionEngineExtension' => 'applications/auth/extension/PhabricatorPasswordDestructionEngineExtension.php',
|
||||
'PhabricatorPasswordHashInterface' => 'applications/auth/password/PhabricatorPasswordHashInterface.php',
|
||||
'PhabricatorPasswordHasher' => 'infrastructure/util/password/PhabricatorPasswordHasher.php',
|
||||
'PhabricatorPasswordHasherTestCase' => 'infrastructure/util/password/__tests__/PhabricatorPasswordHasherTestCase.php',
|
||||
'PhabricatorPasswordHasherUnavailableException' => 'infrastructure/util/password/PhabricatorPasswordHasherUnavailableException.php',
|
||||
|
@ -9997,7 +9997,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorFulltextInterface',
|
||||
'PhabricatorFerretInterface',
|
||||
'PhabricatorConduitResultInterface',
|
||||
'PhabricatorPasswordHashInterface',
|
||||
'PhabricatorAuthPasswordHashInterface',
|
||||
),
|
||||
'PhabricatorUserBadgesCacheType' => 'PhabricatorUserCacheType',
|
||||
'PhabricatorUserBlurbField' => 'PhabricatorUserCustomField',
|
||||
|
|
|
@ -27,7 +27,7 @@ final class PhabricatorAuthPasswordEngine
|
|||
return $this->contentSource;
|
||||
}
|
||||
|
||||
public function setObject(PhabricatorPasswordHashInterface $object) {
|
||||
public function setObject(PhabricatorAuthPasswordHashInterface $object) {
|
||||
$this->object = $object;
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
interface PhabricatorPasswordHashInterface {
|
||||
interface PhabricatorAuthPasswordHashInterface {
|
||||
|
||||
public function newPasswordDigest(
|
||||
PhutilOpaqueEnvelope $envelope,
|
|
@ -21,7 +21,7 @@ final class PhabricatorAuthPassword
|
|||
const PASSWORD_TYPE_TEST = 'test';
|
||||
|
||||
public static function initializeNewPassword(
|
||||
PhabricatorPasswordHashInterface $object,
|
||||
PhabricatorAuthPasswordHashInterface $object,
|
||||
$type) {
|
||||
|
||||
return id(new self())
|
||||
|
@ -80,7 +80,7 @@ final class PhabricatorAuthPassword
|
|||
|
||||
public function upgradePasswordHasher(
|
||||
PhutilOpaqueEnvelope $envelope,
|
||||
PhabricatorPasswordHashInterface $object) {
|
||||
PhabricatorAuthPasswordHashInterface $object) {
|
||||
|
||||
// Before we make changes, double check that this is really the correct
|
||||
// password. It could be really bad if we "upgraded" a password and changed
|
||||
|
@ -98,7 +98,7 @@ final class PhabricatorAuthPassword
|
|||
|
||||
public function setPassword(
|
||||
PhutilOpaqueEnvelope $password,
|
||||
PhabricatorPasswordHashInterface $object) {
|
||||
PhabricatorAuthPasswordHashInterface $object) {
|
||||
|
||||
$hasher = PhabricatorPasswordHasher::getBestHasher();
|
||||
return $this->setPasswordWithHasher($password, $object, $hasher);
|
||||
|
@ -106,7 +106,7 @@ final class PhabricatorAuthPassword
|
|||
|
||||
public function setPasswordWithHasher(
|
||||
PhutilOpaqueEnvelope $password,
|
||||
PhabricatorPasswordHashInterface $object,
|
||||
PhabricatorAuthPasswordHashInterface $object,
|
||||
PhabricatorPasswordHasher $hasher) {
|
||||
|
||||
if (!strlen($password->openEnvelope())) {
|
||||
|
@ -130,7 +130,7 @@ final class PhabricatorAuthPassword
|
|||
|
||||
public function comparePassword(
|
||||
PhutilOpaqueEnvelope $password,
|
||||
PhabricatorPasswordHashInterface $object) {
|
||||
PhabricatorAuthPasswordHashInterface $object) {
|
||||
|
||||
$digest = $this->digestPassword($password, $object);
|
||||
$hash = $this->newPasswordEnvelope();
|
||||
|
@ -144,7 +144,7 @@ final class PhabricatorAuthPassword
|
|||
|
||||
private function digestPassword(
|
||||
PhutilOpaqueEnvelope $password,
|
||||
PhabricatorPasswordHashInterface $object) {
|
||||
PhabricatorAuthPasswordHashInterface $object) {
|
||||
|
||||
$object_phid = $object->getPHID();
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ final class PhabricatorUser
|
|||
PhabricatorFulltextInterface,
|
||||
PhabricatorFerretInterface,
|
||||
PhabricatorConduitResultInterface,
|
||||
PhabricatorPasswordHashInterface {
|
||||
PhabricatorAuthPasswordHashInterface {
|
||||
|
||||
const SESSION_TABLE = 'phabricator_session';
|
||||
const NAMETOKEN_TABLE = 'user_nametoken';
|
||||
|
@ -1565,7 +1565,7 @@ final class PhabricatorUser
|
|||
return $variables[$variable_key];
|
||||
}
|
||||
|
||||
/* -( PhabricatorPasswordHashInterface )----------------------------------- */
|
||||
/* -( PhabricatorAuthPasswordHashInterface )------------------------------- */
|
||||
|
||||
|
||||
public function newPasswordDigest(
|
||||
|
|
Loading…
Reference in a new issue