File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 6
6
using Microsoft . Extensions . DependencyInjection ;
7
7
using Newtonsoft . Json . Serialization ;
8
8
using Supermarket . Extensions ;
9
- using Swashbuckle . AspNetCore . Swagger ;
9
+ using Supermarket . Resources ;
10
10
11
11
namespace Supermarket
12
12
{
@@ -22,12 +22,22 @@ public Startup(IConfiguration configuration)
22
22
// This method gets called by the runtime. Use this method to add services to the container.
23
23
public void ConfigureServices ( IServiceCollection services )
24
24
{
25
+
26
+ //inject AppSettings
27
+ services . Configure < ApplicationSettings > ( Configuration . GetSection ( "ApplicationSettings" ) ) ;
28
+
25
29
services . ConfigureCors ( ) ;
26
30
27
31
services . ConfigureIISIntegration ( ) ;
28
32
29
33
services . ConfigureMSSQLContext ( Configuration ) ;
30
34
35
+ services . ConfigureIdentity ( ) ;
36
+
37
+ services . ConfigurePasswordPolicy ( ) ;
38
+
39
+ services . ConfigureAuthentication ( Configuration ) ;
40
+
31
41
services . ConfigureRepositoryWrapper ( ) ;
32
42
33
43
services . ConfigureServicesWrapper ( ) ;
@@ -55,6 +65,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
55
65
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
56
66
app . UseHsts ( ) ;
57
67
}
68
+ app . UseAuthentication ( ) ;
58
69
59
70
app . UseHttpsRedirection ( ) ;
60
71
You can’t perform that action at this time.
0 commit comments