Table of Contents

Class TwoFactorConfiguration

Namespace
DisCatSharp.Extensions.TwoFactorCommands
Assembly
DisCatSharp.Extensions.TwoFactorCommands.dll

Represents a configuration for TwoFactorExtension.

public sealed class TwoFactorConfiguration
Inheritance
TwoFactorConfiguration
Inherited Members

Constructors

TwoFactorConfiguration()

Creates a new instance of TwoFactorConfiguration.

TwoFactorConfiguration(TwoFactorConfiguration)

Creates a new instance of TwoFactorConfiguration, copying the properties of another configuration.

TwoFactorConfiguration(IServiceProvider)

Initializes a new instance of the TwoFactorConfiguration class.

Properties

Algorithm

Sets the algorithm. Defaults to TwoFactorAuthNet.Algorithm.SHA1.

DatabasePath

Sets the database path. Defaults to ./twofactor.sqlite.

Digits

Sets the length of digits for the 2fa code. Defaults to 6.

Issuer

Sets the issuer.

Defaults to aitsys.dev to show the DisCatSharp logo.

Period

Sets the period in seconds how long a code is valid. Defaults to 30 seconds..

ResponseConfiguration

Sets overrides for default messages facing the user.

ServiceProvider

Sets the service provider for this TwoFactor instance.

Objects in this provider are used when instantiating command modules. This allows passing data around without resorting to static members.

Defaults to an empty service provider.

TwoFactorTimeout

Sets how long user have to enter the 2fa code. Defaults to 30 seconds.