Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

1.4 KB
Raw Blame
using Grand.Business.Authentication.Services;
using Grand.Business.Core.Interfaces.Authentication;
using Grand.Infrastructure;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Grand.Business.Authentication.Startup;

public class StartupApplication : IStartupApplication
{
    public void ConfigureServices(IServiceCollection services, IConfiguration configuration)
    {
        services.AddScoped<IGrandAuthenticationService, CookieAuthenticationService>();
        services.AddScoped<ICookieOptionsFactory, CookieOptionsFactory>();
        services.AddScoped<IApiAuthenticationService, ApiAuthenticationService>();
        services.AddScoped<IJwtBearerAuthenticationService, JwtBearerAuthenticationService>();
        services.AddScoped<ITwoFactorAuthenticationService, TwoFactorAuthenticationService>();
        services.AddScoped<IExternalAuthenticationService, ExternalAuthenticationService>();
        services.AddScoped<IJwtBearerCustomerAuthenticationService, JwtBearerCustomerAuthenticationService>();
        services.AddScoped<IRefreshTokenService, RefreshTokenService>();
    }

    public void Configure(WebApplication application, IWebHostEnvironment webHostEnvironment)
    {        
    }

    public int Priority => 100;
    public bool BeforeConfigure => false;
}