18 lines
No EOL
471 B
C#
18 lines
No EOL
471 B
C#
using Foxchat.Chat.Middleware;
|
|
|
|
namespace Foxchat.Chat.Extensions;
|
|
|
|
public static class WebApplicationExtensions
|
|
{
|
|
public static IServiceCollection AddCustomMiddleware(this IServiceCollection services)
|
|
{
|
|
return services
|
|
.AddScoped<AuthenticationMiddleware>();
|
|
}
|
|
|
|
public static IApplicationBuilder UseCustomMiddleware(this IApplicationBuilder app)
|
|
{
|
|
return app
|
|
.UseMiddleware<AuthenticationMiddleware>();
|
|
}
|
|
} |