pub struct AuthCodes<T: TimeProvider = DefaultTimeProvider> { /* private fields */ }
Expand description

Manages authorization codes for SignerUIs

Implementations

Reads AuthCodes from file and creates new instance using DefaultTimeProvider.

Writes all AuthCodes to a disk.

Creates a new AuthCodes store with given TimeProvider.

Checks if given hash is correct authcode of SignerUI Updates this hash last used field in case it’s valid.

Generates and returns a new code that can be used by SignerUIs

Returns true if there are no tokens in this store

Removes old tokens that have not been used since creation.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.