OtpServiceExtensions
Namespace: SimpleOTP.DependencyInjection
Extension methods for the One-Time Password service.
public static class OtpServiceExtensions
Inheritance Object → OtpServiceExtensions
Attributes NullableContextAttribute, NullableAttribute, ExtensionAttribute
Methods
AddAuthenticator(IServiceCollection, String)
Adds the One-Time Password service to the service collection.
public static IServiceCollection AddAuthenticator(IServiceCollection services, string issuerName)
Parameters
services IServiceCollection
The service collection.
issuerName String
The issuer/application/service name.
Returns
IServiceCollection
A reference to this instance after the operation has completed.
AddAuthenticator(IServiceCollection, String, Action<OtpOptions>)
Adds the One-Time Password service to the service collection.
public static IServiceCollection AddAuthenticator(IServiceCollection services, string issuerName, Action<OtpOptions> configure)
Parameters
services IServiceCollection
The service collection.
issuerName String
The issuer/application/service name.
configure Action<OtpOptions>
The configuration for the One-Time Password service.
Returns
IServiceCollection
A reference to this instance after the operation has completed.
AddAuthenticator(IServiceCollection, IConfiguration)
Adds the One-Time Password service to the service collection.
public static IServiceCollection AddAuthenticator(IServiceCollection services, IConfiguration configuration)
Parameters
services IServiceCollection
The service collection.
configuration IConfiguration
The configuration for the One-Time Password service.
Returns
IServiceCollection
A reference to this instance after the operation has completed.
AddAuthenticator(IServiceCollection, IConfiguration, Action<OtpOptions>)
Adds the One-Time Password service to the service collection.
public static IServiceCollection AddAuthenticator(IServiceCollection services, IConfiguration configuration, Action<OtpOptions> configure)
Parameters
services IServiceCollection
The service collection.
configuration IConfiguration
The configuration for the One-Time Password service.
configure Action<OtpOptions>
The configuration for the One-Time Password service.
Returns
IServiceCollection
A reference to this instance after the operation has completed.
©2025 Eugene Fox. Licensed under MIT license