Content/Template.Api/Middlewares/BasicAuthentication/BasicAuthenticationMiddlewareExtensionMethods.cs
/// <summary>
/// Registers the username and token for the BasicAuthenticationMiddleware
/// </summary>
/// <param name="services"></param>
/// <param name="username"></param>
/// <param name="token"></param>
/// <returns></returns>
Registers the username and token for the BasicAuthenticationMiddleware
Registers the username and token for the BasicAuthenticationMiddleware
public static IServiceCollection RegisterAuthentication(this IServiceCollection services, string username,
            string token)
        {
            return services.AddSingleton(new BasicAuthenticationConfiguration(username, token));
        }
public static IServiceCollection RegisterAuthentication ( this IServiceCollection services , string username , string token ) { return services . AddSingleton ( new BasicAuthenticationConfiguration ( username , token ) ) ; }
Registers the username and token for the BasicAuthenticationMiddleware
Registers the username and token for the BasicAuthenticationMiddleware
None
IServiceCollection
this
username
string
None
token
string
None
services
None