24 lines
797 B
C#
24 lines
797 B
C#
using DysonNetwork.Pass.Features.Auth.Interfaces;
|
|
using DysonNetwork.Pass.Features.Auth.Services;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace DysonNetwork.Pass.Features.Auth;
|
|
|
|
public static class ServiceCollectionExtensions
|
|
{
|
|
public static IServiceCollection AddAuthServices(this IServiceCollection services)
|
|
{
|
|
// Core services
|
|
services.AddScoped<ISessionService, SessionService>();
|
|
services.AddScoped<IAuthenticationService, AuthenticationService>();
|
|
|
|
// OIDC services will be registered by their respective implementations
|
|
services.AddScoped<IOidcService, OidcService>();
|
|
|
|
// Add HTTP context accessor if not already added
|
|
services.AddHttpContextAccessor();
|
|
|
|
return services;
|
|
}
|
|
}
|