Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 0e07337

Browse files
committed
db settings
1 parent dcc38b0 commit 0e07337

5 files changed

Lines changed: 19 additions & 42 deletions

File tree

src/Backend/Jp.Infra.CrossCutting.Database/DbSettingsConfig.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using Jp.Infra.Data.MySql.Configuration;
44
using Jp.Infra.Data.PostgreSQL.Configuration;
55
using Jp.Infra.Data.Sql.Configuration;
6-
using Microsoft.AspNetCore.Identity;
76
using Jp.Infra.Data.Sqlite.Configuration;
7+
using Microsoft.AspNetCore.Identity;
88
using Microsoft.Extensions.Configuration;
99
using Microsoft.Extensions.DependencyInjection;
1010

@@ -31,6 +31,10 @@ public static void ConfigureDatabase(this IServiceCollection services, IConfigur
3131
services.AddIdentitySqlite(connString);
3232
break;
3333
}
34+
35+
services.AddIdentity<UserIdentity, UserIdentityRole>()
36+
.AddEntityFrameworkStores<ApplicationIdentityContext>()
37+
.AddDefaultTokenProviders();
3438
}
3539

3640
public static void ConfigureIdentityServerDatabase(this IIdentityServerBuilder builder, IConfiguration configuration)

src/Backend/Jp.Infra.Data.Sqlite/Configuration/IdentityConfig.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ public static IServiceCollection AddIdentitySqlite(this IServiceCollection servi
2525
services.AddDbContext<JpContext>(options => options.UseSqlite(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly)));
2626
services.AddDbContext<EventStoreContext>(options => options.UseSqlite(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly)));
2727

28-
services.AddIdentity<UserIdentity, UserIdentityRole>()
29-
.AddEntityFrameworkStores<ApplicationIdentityContext>()
30-
.AddDefaultTokenProviders();
3128
return services;
3229
}
3330
}

src/Backend/Jp.UserManagement/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// MySql connection
88
// "SSOConnection": "server=localhost,port=3306;database=jpproject;user=bruno;password=10203040"
99
// SQLite Connection
10-
"SSOConnection": "Data Source=jpproject.db"
10+
//"SSOConnection": "Data Source=jpproject.db"
1111
},
1212
"Logging": {
1313
"IncludeScopes": false,
@@ -32,7 +32,7 @@
3232
"SendEmail": "false"
3333
},
3434
"ApplicationSettings": {
35-
"DatabaseType": "SQLITE",
35+
"DatabaseType": "SQLServer",
3636
"Authority": "https://localhost:5001"
3737
}
3838
}

src/Frontend/Jp.UI.SSO/Properties/launchSettings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"environmentVariables": {
2020
"ASPNETCORE_URLS": "http://localhost:5000;https://localhost:5001",
2121
"ASPNETCORE_ENVIRONMENT": "Development",
22-
"APPINSIGHTS_INSTRUMENTATIONKEY": "205fabcd-09ee-46f5-bb74-95780fc873da",
23-
22+
"APPINSIGHTS_INSTRUMENTATIONKEY": "205fabcd-09ee-46f5-bb74-95780fc873da"
2423
},
2524
"applicationUrl": "http://localhost:5000;https://localhost:5001"
2625
}

src/Frontend/Jp.UI.SSO/appsettings.json

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"ConnectionStrings": {
33
// Postgre Connection
4-
//"SSOConnection": "Server=localhost;Port=5432;Database=jpproject;User Id=postgres;Password=@Password1;"
5-
// Sql Server Connection
6-
//"SSOConnection": "Server=.;Initial Catalog=JpProject;Persist Security Info=False;User ID=sa;Password=@Password1;MultipleActiveResultSets=False;Connection Timeout=30;"
7-
// MySql Connection
4+
//"SSOConnection": "Server=localhost;Port=5432;Database=jpproject;User Id=postgres;Password=@Password1;",
5+
// Sql Server connection
6+
"SSOConnection": "Server=.;Initial Catalog=JpProject;Persist Security Info=False;User ID=sa;Password=@Password1;MultipleActiveResultSets=False;Connection Timeout=30;"
7+
// MySql connection
88
//"SSOConnection": "server=localhost,port=3306;database=jpproject;user=bruno;password=10203040"
99
// SQLite Connection
10-
"SSOConnection": "Data Source=jpproject.db"
10+
//"SSOConnection": "Data Source=jpproject.db"
1111
},
1212
"CertificateOptions": {
1313
"Type": "Temporary",
@@ -38,39 +38,16 @@
3838
"ClientId": "27416902506-r7o9rfmcma3m6gnuck7q5vf1939o3003.apps.googleusercontent.com",
3939
"ClientSecret": "BZ3muDLrCavUcsFPz44hK9-i"
4040
},
41-
"Logging": {
42-
"IncludeScopes": false,
43-
"LogLevel": {
44-
"Default": "Debug",
45-
"System": "Information",
46-
"Microsoft": "Information"
47-
}
48-
},
49-
"EmailConfiguration": {
50-
"SmtpServer": "smtp.gmail.com",
51-
"SmtpPort": 587,
52-
"UseSsl": false,
53-
"SmtpUsername": "donotreply@jpproject.com",
54-
"SmtpPassword": "<secret>",
55-
"FromName": "Jp Project Team",
56-
"FromAddress": "donotreply@jpproject.com",
57-
"SendEmail": "false"
58-
},
59-
"ExternalLogin": {
60-
"Google": {
61-
"ClientId": "27416902506-r7o9rfmcma3m6gnuck7q5vf1939o3003.apps.googleusercontent.com",
62-
"ClientSecret": "BZ3muDLrCavUcsFPz44hK9-i"
63-
},
64-
"Facebook": {
65-
"ClientId": "2205593199670245",
66-
"ClientSecret": "c5646224e92f226ffa49be2e1482d284"
67-
}
68-
},
41+
"Facebook": {
42+
"ClientId": "2205593199670245",
43+
"ClientSecret": "c5646224e92f226ffa49be2e1482d284"
44+
}
45+
},
6946
"ApplicationSettings": {
7047
"EnableExternalProviders": "true",
7148
"UserManagementURL": "http://localhost:4200",
7249
"IS4AdminUi": "http://localhost:4300",
73-
"DatabaseType": "SQLITE",
50+
"DatabaseType": "SqlServer",
7451
"DefaultUser": "bruno",
7552
"DefaultPass": "Pa$$word123",
7653
"DefaultEmail": "bhdebrito@gmail.com"

0 commit comments

Comments
 (0)