Files
Auth.RCL/Config/AuthModuleExtensions.cs

21 lines
725 B
C#

using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Components.Authorization;
using Blazored.LocalStorage;
using Auth.RCL.Services;
namespace Auth.RCL.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;
}
}
}