Files
Auth.Module/Config/AuthModuleExtensions.cs
T
2026-08-07 02:17:31 +03:00

21 lines
731 B
C#

using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Components.Authorization;
using Blazored.LocalStorage;
using Auth.Module.Services;
namespace Auth.Module.Config
{
public static class AuthModuleExtensions
{
public static IServiceCollection AuthModuleServices(this IServiceCollection services)
{
services.AddScoped<AuthenticationStateProvider, ApiAuthenticationStateProvider>();
// services.AddScoped<IAuthService>(sp => (ApiAuthenticationStateProvider)sp.GetRequiredService<AuthenticationStateProvider>());
services.AddScoped<RoleAPIConsumer>();
services.AddScoped<UserAPIConsumer>();
return services;
}
}
}