class PasswordUsageTracker (View source)

Properties

protected EntityManagerInterface $entityManager

The entity manager we're saving usages against

protected int $maxReuse

The number of used strings we will track per subject

Methods

__construct(EntityManagerInterface $entityManager, $maxReuse)

No description

bool
trackUse(string $string, int|User|UserInfo|User $subject)

Track a string being used

pruneUses(int $subject)

Prune uses for a specific subject

int
resolveUserID($subject)

No description

Details

__construct(EntityManagerInterface $entityManager, $maxReuse)

No description

Parameters

EntityManagerInterface $entityManager
$maxReuse

bool trackUse(string $string, int|User|UserInfo|User $subject)

Track a string being used

Parameters

string $string

The password that was used

int|User|UserInfo|User $subject

The subject that used the password

Return Value

bool

private pruneUses(int $subject)

Prune uses for a specific subject

Parameters

int $subject

private int resolveUserID($subject)

No description

Parameters

$subject

Return Value

int

Exceptions

InvalidArgumentException