Table of Contents

Method HasExpiredAt

Namespace
MailFathom.Infrastructure.Secrets
Assembly
MailFathom.Infrastructure.dll

HasExpiredAt(DateTimeOffset)

Gets whether the secret has stopped being usable at a given instant.

public bool HasExpiredAt(DateTimeOffset instant)

Parameters

instant DateTimeOffset

The instant to judge the lifetime at, which callers take from an injected TimeProvider.

Returns

bool

true when the lifetime is bounded and that bound has passed; otherwise false.

Remarks

The expiration instant itself is already past: a secret configured to expire at midnight is unusable at midnight rather than for one more tick.