-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (28 loc) · 949 Bytes
/
Program.cs
File metadata and controls
31 lines (28 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Configuration;
namespace SecureIsolatedAzFunction
{
public class Program
{
public static void Main()
{
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults(workerApplication =>
{
workerApplication.UseMiddleware<AuthenticationMiddleware>();
})
.ConfigureAppConfiguration(configuration =>
{
configuration.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
})
.ConfigureServices(services =>
{
services.AddScoped<JwtValidation>();
services.AddScoped<AuthenticationProvider>();
})
.Build();
host.Run();
}
}
}