Table of Contents

Class PasswordAttemptReservation

Namespace
MailFathom.Infrastructure.Security.Passwords
Assembly
MailFathom.Infrastructure.dll

One attempt's verification capacity, taken before the password was verified and returned afterwards.

public sealed class PasswordAttemptReservation : IDisposable
Inheritance
PasswordAttemptReservation
Implements
Inherited Members

Remarks

Disposing returns the capacity, which is what every answer leaves behind — a right password, a throw, and a cancellation alike. Spend() is the one path that costs the allowance anything: it counts the wrong password against the failure axes for a minute and returns the verification capacity immediately, so using is safe beside it.

Properties

IsGranted

Gets a value indicating whether every axis that applies had capacity for this attempt.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Spend()

Counts this attempt against the allowance, because the password it carried was wrong.