@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3interface PhabricatorAuthPasswordHashInterface {
4
5 public function newPasswordDigest(
6 PhutilOpaqueEnvelope $envelope,
7 PhabricatorAuthPassword $password);
8
9 /**
10 * Return a list of strings which passwords associated with this object may
11 * not be similar to.
12 *
13 * This method allows you to prevent users from selecting their username
14 * as their password or picking other passwords which are trivially similar
15 * to an account or object identifier.
16 *
17 * @param PhabricatorUser $viewer The user selecting the password.
18 * @param PhabricatorAuthPasswordEngine $engine The password engine updating a
19 * password.
20 * @return list<string> Blocklist of nonsecret identifiers which the password
21 * should not be similar to.
22 */
23 public function newPasswordBlocklist(
24 PhabricatorUser $viewer,
25 PhabricatorAuthPasswordEngine $engine);
26
27}