diff --git a/docker/.env b/docker/.env deleted file mode 100644 index 46fd6f1..0000000 --- a/docker/.env +++ /dev/null @@ -1 +0,0 @@ -COMPOSE_PROJECT_NAME=devStore \ No newline at end of file diff --git a/docker/docker-compose-local.yml b/docker/docker-compose-local.yml index 2afb69d..b84111c 100644 --- a/docker/docker-compose-local.yml +++ b/docker/docker-compose-local.yml @@ -3,23 +3,23 @@ version: "3" services: devstore-rabbit: - image: rabbitmq:management + image: rabbitmq:3-management container_name: devstore-rabbit ports: - 5672:5672 - 15672:15672 environment: - RABBITMQ_DEFAULT_USER: devstore - RABBITMQ_DEFAULT_PASS: devstore + RABBITMQ_DEFAULT_USER: "devstore" + RABBITMQ_DEFAULT_PASS: "devstore" sql-server: - image: mcr.microsoft.com/mssql/server:2017-latest - container_name: devstore-sql-server - ports: - - 1433:1433 - environment: - SA_PASSWORD: "MyDB@123" - ACCEPT_EULA: "Y" + image: mcr.microsoft.com/mssql/server:2017-latest + container_name: devstore-sql-server + expose: + - 1433 + environment: + SA_PASSWORD: "MyDB@123" + ACCEPT_EULA: "Y" web-mvc: image: desenvolvedorio/devstore-web-mvc-ecommerce:latest @@ -41,7 +41,7 @@ services: - api-identity - api-customers - api-bff-checkout - + api-identity: image: desenvolvedorio/devstore-api-identity:latest container_name: devstore-api-identity @@ -59,7 +59,7 @@ services: depends_on: - devstore-rabbit - sql-server - + api-cart: image: desenvolvedorio/devstore-api-cart:latest container_name: devstore-api-cart @@ -136,7 +136,7 @@ services: - api-cart - api-billing - api-order - + api-billing: image: desenvolvedorio/devstore-api-billing:latest container_name: devstore-api-billing @@ -156,7 +156,7 @@ services: - api-identity - api-order - sql-server - + api-order: image: desenvolvedorio/devstore-api-order:latest container_name: devstore-api-order @@ -183,9 +183,11 @@ services: context: ./ dockerfile: ./nginx/Dockerfile restart: always + volumes: + - ./nginx/conf.d:/etc/nginx/conf.d:ro ports: - - "80:80" - - "443:443" + - "7500:80" + - "7501:443" depends_on: - web-mvc @@ -195,10 +197,14 @@ services: volumes: - ./certs:/https:rw command: > - sh -c "[ -e "./https/devstore.academy-localhost.pfx" ] && echo File Already exist || (openssl genrsa -out devstore.rsa 2048 && + sh -c "[ -e "./https/devstore.academy-localhost.pfx" ] && echo File Already exist || ( + rm /https/devstore.academy-localhost.pfx && + openssl genrsa -out devstore.rsa 2048 && openssl req -sha256 -new -key devstore.rsa -out devstore.csr -subj '/CN=localhost' && - openssl x509 -req -sha256 -days 1825 -in devstore.csr -signkey devstore.rsa -out devstore.crt && - openssl pkcs12 -export -out /https/devstore.academy-localhost.pfx -inkey devstore.rsa -in devstore.crt -password pass:9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe)" + openssl x509 -req -sha256 -days 365 -in devstore.csr -signkey devstore.rsa -out devstore.crt && + openssl pkcs12 -export -out /https/devstore.academy-localhost.pfx -inkey devstore.rsa -in devstore.crt -password pass:9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe && + rm devstore.rsa devstore.csr devstore.crt)" volumes: - dpkeys: \ No newline at end of file + dpkeys: + diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile index 3eec141..ef00a1e 100644 --- a/docker/nginx/Dockerfile +++ b/docker/nginx/Dockerfile @@ -1,4 +1,4 @@ FROM nginx -COPY nginx/nginx.prod.conf /etc/nginx/nginx.conf +COPY nginx/devstore.conf /etc/nginx/conf.d/devstore.conf COPY nginx/nerdstore-certificate.pem /etc/nginx COPY nginx/nerdstore-certificate.key /etc/nginx \ No newline at end of file diff --git a/docker/nginx/conf.d/devstore.conf b/docker/nginx/conf.d/devstore.conf new file mode 100644 index 0000000..23c40ba --- /dev/null +++ b/docker/nginx/conf.d/devstore.conf @@ -0,0 +1,57 @@ + +upstream web-mvc { + server web-mvc:5001; +} + +upstream rabbitmq { + least_conn; + server devstore-rabbit:15672; +} + +server { + listen 80; + server_name $hostname; + + location /rabbitmq/ { + rewrite ^/rabbitmq/(.*)$ /$1 break; + proxy_pass http://rabbitmq; + proxy_buffering off; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location / { + # Google doesn't like 302 redirects, so we use a 301 here + return 301 https://$host:7501$request_uri; + } +} + +server { + listen 443 ssl; + server_name $hostname; + + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers HIGH:!aNULL:!MD5; + + ssl_certificate /etc/nginx/nerdstore-certificate.pem; + ssl_certificate_key /etc/nginx/nerdstore-certificate.key; + + location /rabbitmq/ { + return 302 http://$host:7500$request_uri; + } + + location / { + proxy_pass http://web-mvc; + proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Connection keep-alive; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $server_name; + } + +} \ No newline at end of file diff --git a/docker/nginx/nginx.prod.conf b/docker/nginx/nginx.prod.conf deleted file mode 100644 index f4fdf84..0000000 --- a/docker/nginx/nginx.prod.conf +++ /dev/null @@ -1,43 +0,0 @@ -worker_processes auto; -events { worker_connections 1024; } - -http { - - sendfile on; - - upstream web-mvc { - server web-mvc:5001; - } - - server { - listen 80; - server_name $hostname; - - location / { - return 301 https://$host$request_uri; - } - } - - server { - listen 443 ssl; - server_name $hostname; - - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers HIGH:!aNULL:!MD5; - - ssl_certificate /etc/nginx/nerdstore-certificate.pem; - ssl_certificate_key /etc/nginx/nerdstore-certificate.key; - - location / { - proxy_pass http://web-mvc; - proxy_redirect off; - proxy_http_version 1.1; - proxy_set_header Connection keep-alive; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Host $server_name; - } - } -} \ No newline at end of file diff --git a/docker/pfx/devstore.academy.localhost b/docker/pfx/devstore.academy.localhost deleted file mode 100644 index 5c492fa..0000000 Binary files a/docker/pfx/devstore.academy.localhost and /dev/null differ diff --git a/docker/pfx/devstore.crt b/docker/pfx/devstore.crt deleted file mode 100644 index 332e7ac..0000000 --- a/docker/pfx/devstore.crt +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICrzCCAZcCFAWxMLTPB0q8Ora4PRrIRz2KwZUEMA0GCSqGSIb3DQEBCwUAMBQx -EjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0yMjA0MDQwMzEzMDNaFw0yNzA0MDMwMzEz -MDNaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAMSAbs5JB+0mZL1etOSClVSVSe5OnRzzd3jXI1v0uD++3LLFAbOh -KwKAvLC/fnn5bonhrlpr6wH+3JziGDdW0kknO1OvJGoXdosIZTT6OcBvl/O/q+5F -agvQiA7aXuE12DT9JA3JjMGoOd+0Q+6dwXiFE3q9RgmvoOHmzZVm/2E9g+WAAU9m -Uqks5CD2NXI3xokiArMeMkFxYV6od4AswtDMx8YQseDTh87NB+r2RfubJ8xpYYNe -OyEOzXto6UVUEPvOau/wwxO/urSbPkkjvy0aeysrTCY2LUE1wbPiPp0HpowYiEJU -or4mEbI+YgD5ydXitNheGxdLGcBPjV+AuAECAwEAATANBgkqhkiG9w0BAQsFAAOC -AQEAbmrIDyYQdgwSfP3qYc2DNpExjln+jOmnIH7kSqdMzV48KzBf3/Si50Y8IvMt -+wDN2z77OjhttePC4+kdUVmjRzGVktly+1gLb++fJVvZqT0wV6Ui8SE7xRqA/oL6 -bUqkjHKgrL6VuSj0ruJ5X++Ue0hXBxM+e4O4Umt6qfj2t5IcO0t+slxeO6Cyo1u/ -ZHzy7DDxOXExeEJ48xI1E8lVp7dxDT7Gm92vfhKzkvF6YGMlXCoiFDjYFd07d+8D -xofnYUD507nkNz60IRGWtEHzpBCONrAykCeBnEX0gB05O/BG+NrLSSCdYLS4DmkU -4cpVtbQ1VbeoGhfxFuE1syVwKQ== ------END CERTIFICATE----- diff --git a/docker/pfx/devstore.csr b/docker/pfx/devstore.csr deleted file mode 100644 index d870040..0000000 --- a/docker/pfx/devstore.csr +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIICWTCCAUECAQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEAxIBuzkkH7SZkvV605IKVVJVJ7k6dHPN3eNcjW/S4 -P77cssUBs6ErAoC8sL9+efluieGuWmvrAf7cnOIYN1bSSSc7U68kahd2iwhlNPo5 -wG+X87+r7kVqC9CIDtpe4TXYNP0kDcmMwag537RD7p3BeIUTer1GCa+g4ebNlWb/ -YT2D5YABT2ZSqSzkIPY1cjfGiSICsx4yQXFhXqh3gCzC0MzHxhCx4NOHzs0H6vZF -+5snzGlhg147IQ7Ne2jpRVQQ+85q7/DDE7+6tJs+SSO/LRp7KytMJjYtQTXBs+I+ -nQemjBiIQlSiviYRsj5iAPnJ1eK02F4bF0sZwE+NX4C4AQIDAQABoAAwDQYJKoZI -hvcNAQELBQADggEBAEYYlcxafY3+Dx9vbbSpQRRh7iHPMQwUOdB3d3+XOK7Fh/N0 -6LXVJBiNzQIprcM4LzatFXnTcCjjJc7WsLMK8ZzH+by3npUijQGA6Ns75J5erIQl -4r9WB5THGFONZOFazSBGWesWB1Oq1me7CK92C+TnOn7OIp8TSV+qT2iNHqgPnFRb -e2UayAiKg3EiVw4f0WpYT+CgbBONgjtfvnL+e01LH4XTCgeI2ppkRv+lQM1EhBhx -6Dl/DdCmqnA+IE+7GcrdMHut/QBSYxrita19sXxotlznpwjbfPjUSd2veUgPtHS5 -Ed8b2FmNViNRoDGA1vMbXlS5bf8XMMr+7NQmjls= ------END CERTIFICATE REQUEST----- diff --git a/docker/pfx/devstore.rsa b/docker/pfx/devstore.rsa deleted file mode 100644 index e26eb66..0000000 --- a/docker/pfx/devstore.rsa +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAxIBuzkkH7SZkvV605IKVVJVJ7k6dHPN3eNcjW/S4P77cssUB -s6ErAoC8sL9+efluieGuWmvrAf7cnOIYN1bSSSc7U68kahd2iwhlNPo5wG+X87+r -7kVqC9CIDtpe4TXYNP0kDcmMwag537RD7p3BeIUTer1GCa+g4ebNlWb/YT2D5YAB -T2ZSqSzkIPY1cjfGiSICsx4yQXFhXqh3gCzC0MzHxhCx4NOHzs0H6vZF+5snzGlh -g147IQ7Ne2jpRVQQ+85q7/DDE7+6tJs+SSO/LRp7KytMJjYtQTXBs+I+nQemjBiI -QlSiviYRsj5iAPnJ1eK02F4bF0sZwE+NX4C4AQIDAQABAoIBAQCVHPD40SqWp3/i -xC95CC7RlMgZcsZ+5bJPnNJUQYxfszI+5oi4CyFcMNz/MxGC9ekP8JYiP6qCRSic -VGYT+Gpy4LaAdnOnnk5yithiL1AL26LvcQ/DLCGg/YmB2+wL8pQzAbWOUNfjTQk9 -3MmAFW5vSmzRwzeWuhPX2RFAwnwhCPzbkHhv4mTc47xkskQRaY2gCxOZiqaRdOpD -V/VaDk7TsnsK7MuFaYIInXtFFVDgu4H0mGzZlz03Tzfxd4H4ZFIuPLVzSaGqNIby -PuTCe12uYPlk0fjLU0liIj3wyrkZuFf8U5GDq05na0gGOR51o1m1MHEh5ewlu1Qz -mAK3ITRRAoGBAOCa6HvKAxfN8fhjg7qR3xFv8ELjc7PwpUlmNoycnc2a9vJi+kde -L/pRUsZF9QbRPXYkHtKKLCZY4waMKlNvsE2xVxYicwfMf9ww0sfg8QcGH7fv6Il/ -HSgIGLLxVNmLmpOoAA21dJhPin+n9uVNH+mJdQusdU0+G+L357RW/jIbAoGBAN/3 -5OZwJPX29lks8276DjdoF86nVqYdwaKapPpiET/HPNqHBMHs9lQtHamCfg4w6WgG -lTYyrvfHDpAuZd/mCdYt/tFFfxswZ0s3tni/S3KRhWDM4Qz/c1jAOrpdc0GBmE4F -6ERmzKJK5TRYo+nrlHLmL6a61PxSloGCxJhyGQATAoGAX79p0Cuj+effeQXjSAub -TnGruLgBwPmbXJjoNDUnyFiBYX70NqxeQ5Wbdc6oz8kvLEflo9cnTwmhbk8eVAdO -3y/0cgkphG+XKiTeFjs8RMRFjUIGnWbE5SXecZoTk9HBiaSasT1jgPKXlifiRooE -SqhAb0OLleweMzl/Ww+iuXUCgYAE/wy2L05DxmycdKpBkYZ7qfDOBWGjdwp4zCZe -B44G9DThUx3CDb05B4Cf5W9WdbTfQzZU7TCGCoTCpqZTJliV1JTYqko5mwzS2r1R -WEMgnSpyjF+A4Ln8At3MhoUpsvBo3SzfScPK4wzV7BxL/ZtkLMpnV8ekkVsWLIqi -M/lmzQKBgQCCzyUfHPXhlX66lV6fPb8cLcoHKz3U/UiPGL2J+wd5lOWp0tp/qV/V -FGWaxDptl1IGeb7TPNm5tsXppFOPk/ixzYHc/b9c3U9efISCRLeT3rYBdfXZpyw6 -bqj9s4CgzmY/H3IKWTH6FzxMiKVsw/eh+/O+F9qy5nMht2wzDh1BXg== ------END RSA PRIVATE KEY----- diff --git a/src/building-blocks/DevStore.WebAPI.Core/Configuration/DbHealthChecker.cs b/src/building-blocks/DevStore.WebAPI.Core/Configuration/DbHealthChecker.cs index 6e7c7e7..2bd8c44 100644 --- a/src/building-blocks/DevStore.WebAPI.Core/Configuration/DbHealthChecker.cs +++ b/src/building-blocks/DevStore.WebAPI.Core/Configuration/DbHealthChecker.cs @@ -55,7 +55,7 @@ private static bool CanConnect(DbContext context) context.Database.GetAppliedMigrations(); // Check the database connection return true; } - catch + catch (Exception ex) { return false; } diff --git a/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ContextConfiguration.cs b/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ContextConfiguration.cs new file mode 100644 index 0000000..c9311d8 --- /dev/null +++ b/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ContextConfiguration.cs @@ -0,0 +1,26 @@ +using System; +using System.Linq; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; + +namespace DevStore.WebAPI.Core.DatabaseFlavor; + +/// +/// SqlServer configuration +/// +public static class ContextConfiguration +{ + + /// + /// ASP.NET Identity Context config + /// + public static IServiceCollection PersistStore(this IServiceCollection services, Action databaseConfig) where TContext : DbContext + { + // Add a DbContext to store Keys. SigningCredentials and DataProtectionKeys + if (services.All(x => x.ServiceType != typeof(TContext))) + services.AddDbContext(databaseConfig); + return services; + } + + +} \ No newline at end of file diff --git a/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/DatabaseType.cs b/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/DatabaseType.cs new file mode 100644 index 0000000..50b674e --- /dev/null +++ b/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/DatabaseType.cs @@ -0,0 +1,9 @@ +namespace DevStore.WebAPI.Core.DatabaseFlavor; + +public enum DatabaseType +{ + SqlServer, + MySql, + Postgre, + Sqlite, +} \ No newline at end of file diff --git a/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ProviderConfiguration.cs b/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ProviderConfiguration.cs new file mode 100644 index 0000000..87cc38b --- /dev/null +++ b/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ProviderConfiguration.cs @@ -0,0 +1,43 @@ +using System; +using System.Reflection; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using MySqlConnector; + +namespace DevStore.WebAPI.Core.DatabaseFlavor; + +public class ProviderConfiguration +{ + private readonly string _connectionString; + public static ProviderConfiguration With; + private static readonly string MigrationAssembly = typeof(ProviderConfiguration).GetTypeInfo().Assembly.GetName().Name; + + public static void Build(string connString) + { + if (With is null) + With = new ProviderConfiguration(connString); + } + + public ProviderConfiguration(string connString) => _connectionString = connString; + + public Action SqlServer => + options => options.UseSqlServer(_connectionString, sql => sql.MigrationsAssembly(MigrationAssembly)); + + public Action MySql => + options => options.UseMySql(_connectionString, ServerVersion.AutoDetect(_connectionString), sql => sql.MigrationsAssembly(MigrationAssembly)); + + public Action Postgre => + options => options.UseNpgsql(_connectionString, sql => sql.MigrationsAssembly(MigrationAssembly)); + + public Action Sqlite => + options => options.UseSqlite(_connectionString, sql => sql.MigrationsAssembly(MigrationAssembly)); + + + /// + /// it's just a tuple. Returns 2 parameters. + /// Trying to improve readability at ConfigureServices + /// + public static (DatabaseType, string) DetectDatabase(IConfiguration configuration) => ( + configuration.GetValue("AppSettings:DatabaseType"), + configuration.GetConnectionString("DefaultConnection")); +} \ No newline at end of file diff --git a/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ProviderSelector.cs b/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ProviderSelector.cs new file mode 100644 index 0000000..bf3b13f --- /dev/null +++ b/src/building-blocks/DevStore.WebAPI.Core/DatabaseFlavor/ProviderSelector.cs @@ -0,0 +1,43 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using static DevStore.WebAPI.Core.DatabaseFlavor.ProviderConfiguration; + +namespace DevStore.WebAPI.Core.DatabaseFlavor +{ + public static class ProviderSelector + { + public static IServiceCollection ConfigureProviderForContext( + this IServiceCollection services, + (DatabaseType, string) options) where TContext : DbContext + { + var (database, connString) = options; + Build(connString); + return database switch + { + DatabaseType.SqlServer => services.PersistStore(With.SqlServer), + DatabaseType.MySql => services.PersistStore(With.MySql), + DatabaseType.Postgre => services.PersistStore(With.Postgre), + DatabaseType.Sqlite => services.PersistStore(With.Sqlite), + + _ => throw new ArgumentOutOfRangeException(nameof(database), database, null) + }; + } + + public static Action WithProviderAutoSelection((DatabaseType, string) options) + { + var (database, connString) = options; + Build(connString); + return database switch + { + DatabaseType.SqlServer => With.SqlServer, + DatabaseType.MySql => With.MySql, + DatabaseType.Postgre => With.Postgre, + DatabaseType.Sqlite => With.Sqlite, + + _ => throw new ArgumentOutOfRangeException(nameof(database), database, null) + }; + } + + } +} diff --git a/src/building-blocks/DevStore.WebAPI.Core/DevStore.WebAPI.Core.csproj b/src/building-blocks/DevStore.WebAPI.Core/DevStore.WebAPI.Core.csproj index 096bbc7..c2e0770 100644 Binary files a/src/building-blocks/DevStore.WebAPI.Core/DevStore.WebAPI.Core.csproj and b/src/building-blocks/DevStore.WebAPI.Core/DevStore.WebAPI.Core.csproj differ diff --git a/src/services/DevStore.Billing.API/Configuration/ApiConfig.cs b/src/services/DevStore.Billing.API/Configuration/ApiConfig.cs index 9021293..a2ef0bd 100644 Binary files a/src/services/DevStore.Billing.API/Configuration/ApiConfig.cs and b/src/services/DevStore.Billing.API/Configuration/ApiConfig.cs differ diff --git a/src/services/DevStore.Billing.API/appsettings.Development.json b/src/services/DevStore.Billing.API/appsettings.Development.json index 4db4eba..780c752 100644 --- a/src/services/DevStore.Billing.API/appsettings.Development.json +++ b/src/services/DevStore.Billing.API/appsettings.Development.json @@ -15,7 +15,8 @@ "AppSettings": { "JwksUri": "https://localhost:5421/jwks", "Issuer": "https://devstore.academy", - "Audience": "DevStore" + "Audience": "DevStore", + "DatabaseType": "SqlServer" }, "BillingConfig": { "DefaultApiKey": "ak_ewr4dsWehiwAT", diff --git a/src/services/DevStore.Billing.API/appsettings.Docker.json b/src/services/DevStore.Billing.API/appsettings.Docker.json index a0ab141..04393e4 100644 --- a/src/services/DevStore.Billing.API/appsettings.Docker.json +++ b/src/services/DevStore.Billing.API/appsettings.Docker.json @@ -7,7 +7,7 @@ } }, "ConnectionStrings": { - "DefaultConnection": "Server=sql-server;Database=DSBilling;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123" + "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=DSBilling;MultipleActiveResultSets=true" }, "MessageQueueConnection": { "MessageBus": "host=devstore-rabbit:5672;publisherConfirms=true;timeout=30;username=devstore;password=devstore" diff --git a/src/services/DevStore.Identity.API/Configuration/IdentityConfig.cs b/src/services/DevStore.Identity.API/Configuration/IdentityConfig.cs index 8547537..3e65afe 100644 Binary files a/src/services/DevStore.Identity.API/Configuration/IdentityConfig.cs and b/src/services/DevStore.Identity.API/Configuration/IdentityConfig.cs differ diff --git a/src/services/DevStore.Identity.API/appsettings.json b/src/services/DevStore.Identity.API/appsettings.json index 61c9b5a..ed971cd 100644 --- a/src/services/DevStore.Identity.API/appsettings.json +++ b/src/services/DevStore.Identity.API/appsettings.json @@ -7,8 +7,9 @@ } }, "AllowedHosts": "*", - "AppJwtSettings": { + "AppSettings": { "Issuer": "https://devstore.academy", - "Audience": "DevStore" + "Audience": "DevStore", + "DatabaseType": "SqlServer" } }