From b5d5e4afbe5d9a822b2b9b3d1670b59c1f96e133 Mon Sep 17 00:00:00 2001 From: Uncled1023 Date: Sun, 4 Aug 2019 14:13:40 -0700 Subject: [PATCH] Updated to .NET Core 2.2 (Except MVC Routing) --- Configuration/Configuration.csproj | 4 +- GitService/GitService.csproj | 2 +- ..._2_5_1_ConfigDBUpdateMigration.Designer.cs | 692 ++++++++++++++++++ ...804060515_2_5_1_ConfigDBUpdateMigration.cs | 72 ++ .../ConfigurationDbContextModelSnapshot.cs | 15 +- ...ersistedGrantDBUpdateMigration.Designer.cs | 93 +++ ...3_2_5_1_PersistedGrantDBUpdateMigration.cs | 63 ++ .../PersistedGrantDbContextModelSnapshot.cs | 40 +- IdentityServer/IdentityServer.csproj | 14 +- IdentityServer/Program.cs | 10 + .../Teknik Identity - Development.pubxml | 2 +- IdentityServer/Properties/launchSettings.json | 62 +- IdentityServer/Startup.cs | 5 +- Logging/Logging.csproj | 6 +- ServiceWorker/ServiceWorker.csproj | 4 +- Teknik.sln | 18 +- Teknik/Program.cs | 8 + .../Teknik - Development.pubxml | 2 +- Teknik/Properties/launchSettings.json | 68 +- Teknik/Scripts/User/DeveloperSettings.js | 2 +- Teknik/Startup.cs | 8 +- Teknik/Teknik.csproj | 29 +- Tracking/Tracking.csproj | 8 +- Utilities/TagHelpers/BundleTagHelper.cs | 5 +- Utilities/Utilities.csproj | 12 +- global.json | 2 +- 26 files changed, 1124 insertions(+), 122 deletions(-) create mode 100644 IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.Designer.cs create mode 100644 IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.cs create mode 100644 IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.Designer.cs create mode 100644 IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.cs diff --git a/Configuration/Configuration.csproj b/Configuration/Configuration.csproj index 00253d7..7c91737 100644 --- a/Configuration/Configuration.csproj +++ b/Configuration/Configuration.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 Teknik.Configuration Teknik.Configuration win-x86;win-x64;linux-x64;linux-arm;osx-x64 @@ -9,7 +9,7 @@ - + diff --git a/GitService/GitService.csproj b/GitService/GitService.csproj index 30a1719..2946c30 100644 --- a/GitService/GitService.csproj +++ b/GitService/GitService.csproj @@ -9,7 +9,7 @@ - + diff --git a/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.Designer.cs b/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.Designer.cs new file mode 100644 index 0000000..57f2030 --- /dev/null +++ b/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.Designer.cs @@ -0,0 +1,692 @@ +// +using System; +using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb +{ + [DbContext(typeof(ConfigurationDbContext))] + [Migration("20190804060515_2_5_1_ConfigDBUpdateMigration")] + partial class _2_5_1_ConfigDBUpdateMigration + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Created"); + + b.Property("Description") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasMaxLength(200); + + b.Property("Enabled"); + + b.Property("LastAccessed"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200); + + b.Property("NonEditable"); + + b.Property("Updated"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("ApiResources"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResourceClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ApiResourceId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(200); + + b.HasKey("Id"); + + b.HasIndex("ApiResourceId"); + + b.ToTable("ApiClaims"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResourceProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ApiResourceId"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("ApiResourceId"); + + b.ToTable("ApiProperties"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ApiResourceId"); + + b.Property("Description") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasMaxLength(200); + + b.Property("Emphasize"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200); + + b.Property("Required"); + + b.Property("ShowInDiscoveryDocument"); + + b.HasKey("Id"); + + b.HasIndex("ApiResourceId"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("ApiScopes"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiScopeClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ApiScopeId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(200); + + b.HasKey("Id"); + + b.HasIndex("ApiScopeId"); + + b.ToTable("ApiScopeClaims"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiSecret", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ApiResourceId"); + + b.Property("Created"); + + b.Property("Description") + .HasMaxLength(1000); + + b.Property("Expiration"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(4000); + + b.HasKey("Id"); + + b.HasIndex("ApiResourceId"); + + b.ToTable("ApiSecrets"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.Client", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("AbsoluteRefreshTokenLifetime"); + + b.Property("AccessTokenLifetime"); + + b.Property("AccessTokenType"); + + b.Property("AllowAccessTokensViaBrowser"); + + b.Property("AllowOfflineAccess"); + + b.Property("AllowPlainTextPkce"); + + b.Property("AllowRememberConsent"); + + b.Property("AlwaysIncludeUserClaimsInIdToken"); + + b.Property("AlwaysSendClientClaims"); + + b.Property("AuthorizationCodeLifetime"); + + b.Property("BackChannelLogoutSessionRequired"); + + b.Property("BackChannelLogoutUri") + .HasMaxLength(2000); + + b.Property("ClientClaimsPrefix") + .HasMaxLength(200); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200); + + b.Property("ClientName") + .HasMaxLength(200); + + b.Property("ClientUri") + .HasMaxLength(2000); + + b.Property("ConsentLifetime"); + + b.Property("Created"); + + b.Property("Description") + .HasMaxLength(1000); + + b.Property("DeviceCodeLifetime"); + + b.Property("EnableLocalLogin"); + + b.Property("Enabled"); + + b.Property("FrontChannelLogoutSessionRequired"); + + b.Property("FrontChannelLogoutUri") + .HasMaxLength(2000); + + b.Property("IdentityTokenLifetime"); + + b.Property("IncludeJwtId"); + + b.Property("LastAccessed"); + + b.Property("LogoUri") + .HasMaxLength(2000); + + b.Property("NonEditable"); + + b.Property("PairWiseSubjectSalt") + .HasMaxLength(200); + + b.Property("ProtocolType") + .IsRequired() + .HasMaxLength(200); + + b.Property("RefreshTokenExpiration"); + + b.Property("RefreshTokenUsage"); + + b.Property("RequireClientSecret"); + + b.Property("RequireConsent"); + + b.Property("RequirePkce"); + + b.Property("SlidingRefreshTokenLifetime"); + + b.Property("UpdateAccessTokenClaimsOnRefresh"); + + b.Property("Updated"); + + b.Property("UserCodeType") + .HasMaxLength(100); + + b.Property("UserSsoLifetime"); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.ToTable("Clients"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(250); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientClaims"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientCorsOrigin", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("Origin") + .IsRequired() + .HasMaxLength(150); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientCorsOrigins"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientGrantType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("GrantType") + .IsRequired() + .HasMaxLength(250); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientGrantTypes"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientIdPRestriction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("Provider") + .IsRequired() + .HasMaxLength(200); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientIdPRestrictions"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientPostLogoutRedirectUri", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("PostLogoutRedirectUri") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientPostLogoutRedirectUris"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientProperties"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("RedirectUri") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientRedirectUris"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("Scope") + .IsRequired() + .HasMaxLength(200); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientScopes"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientSecret", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("ClientId"); + + b.Property("Created"); + + b.Property("Description") + .HasMaxLength(2000); + + b.Property("Expiration"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(4000); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientSecrets"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.IdentityClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("IdentityResourceId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(200); + + b.HasKey("Id"); + + b.HasIndex("IdentityResourceId"); + + b.ToTable("IdentityClaims"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.IdentityResource", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("Created"); + + b.Property("Description") + .HasMaxLength(1000); + + b.Property("DisplayName") + .HasMaxLength(200); + + b.Property("Emphasize"); + + b.Property("Enabled"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200); + + b.Property("NonEditable"); + + b.Property("Required"); + + b.Property("ShowInDiscoveryDocument"); + + b.Property("Updated"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("IdentityResources"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.IdentityResourceProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property("IdentityResourceId"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("IdentityResourceId"); + + b.ToTable("IdentityProperties"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResourceClaim", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.ApiResource", "ApiResource") + .WithMany("UserClaims") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResourceProperty", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.ApiResource", "ApiResource") + .WithMany("Properties") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiScope", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.ApiResource", "ApiResource") + .WithMany("Scopes") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiScopeClaim", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.ApiScope", "ApiScope") + .WithMany("UserClaims") + .HasForeignKey("ApiScopeId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiSecret", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.ApiResource", "ApiResource") + .WithMany("Secrets") + .HasForeignKey("ApiResourceId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientClaim", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("Claims") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientCorsOrigin", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("AllowedCorsOrigins") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientGrantType", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("AllowedGrantTypes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientIdPRestriction", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("IdentityProviderRestrictions") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientPostLogoutRedirectUri", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("PostLogoutRedirectUris") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("Properties") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("RedirectUris") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientScope", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("AllowedScopes") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientSecret", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("ClientSecrets") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.IdentityClaim", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.IdentityResource", "IdentityResource") + .WithMany("UserClaims") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.IdentityResourceProperty", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.IdentityResource", "IdentityResource") + .WithMany("Properties") + .HasForeignKey("IdentityResourceId") + .OnDelete(DeleteBehavior.Cascade); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.cs b/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.cs new file mode 100644 index 0000000..9e7ad3d --- /dev/null +++ b/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.cs @@ -0,0 +1,72 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb +{ + public partial class _2_5_1_ConfigDBUpdateMigration : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "NonEditable", + table: "IdentityResources", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "DeviceCodeLifetime", + table: "Clients", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "NonEditable", + table: "Clients", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "UserCodeType", + table: "Clients", + maxLength: 100, + nullable: true); + + migrationBuilder.AddColumn( + name: "UserSsoLifetime", + table: "Clients", + nullable: true); + + migrationBuilder.AddColumn( + name: "NonEditable", + table: "ApiResources", + nullable: false, + defaultValue: false); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "NonEditable", + table: "IdentityResources"); + + migrationBuilder.DropColumn( + name: "DeviceCodeLifetime", + table: "Clients"); + + migrationBuilder.DropColumn( + name: "NonEditable", + table: "Clients"); + + migrationBuilder.DropColumn( + name: "UserCodeType", + table: "Clients"); + + migrationBuilder.DropColumn( + name: "UserSsoLifetime", + table: "Clients"); + + migrationBuilder.DropColumn( + name: "NonEditable", + table: "ApiResources"); + } + } +} diff --git a/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs b/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs index ddd8206..3b94039 100644 --- a/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs +++ b/IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs @@ -15,7 +15,7 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.0-preview2-35157") + .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -41,6 +41,8 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb .IsRequired() .HasMaxLength(200); + b.Property("NonEditable"); + b.Property("Updated"); b.HasKey("Id"); @@ -227,6 +229,8 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb b.Property("Description") .HasMaxLength(1000); + b.Property("DeviceCodeLifetime"); + b.Property("EnableLocalLogin"); b.Property("Enabled"); @@ -245,6 +249,8 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb b.Property("LogoUri") .HasMaxLength(2000); + b.Property("NonEditable"); + b.Property("PairWiseSubjectSalt") .HasMaxLength(200); @@ -268,6 +274,11 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb b.Property("Updated"); + b.Property("UserCodeType") + .HasMaxLength(100); + + b.Property("UserSsoLifetime"); + b.HasKey("Id"); b.HasIndex("ClientId") @@ -507,6 +518,8 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb .IsRequired() .HasMaxLength(200); + b.Property("NonEditable"); + b.Property("Required"); b.Property("ShowInDiscoveryDocument"); diff --git a/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.Designer.cs b/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.Designer.cs new file mode 100644 index 0000000..c504154 --- /dev/null +++ b/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.Designer.cs @@ -0,0 +1,93 @@ +// +using System; +using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.PersistedGrantDb +{ + [DbContext(typeof(PersistedGrantDbContext))] + [Migration("20190804060703_2_5_1_PersistedGrantDBUpdateMigration")] + partial class _2_5_1_PersistedGrantDBUpdateMigration + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => + { + b.Property("UserCode") + .ValueGeneratedOnAdd() + .HasMaxLength(200); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200); + + b.Property("CreationTime"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(200); + + b.Property("Expiration") + .IsRequired(); + + b.Property("SubjectId") + .HasMaxLength(200); + + b.HasKey("UserCode"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.ToTable("DeviceCodes"); + }); + + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => + { + b.Property("Key") + .HasMaxLength(200); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200); + + b.Property("CreationTime"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000); + + b.Property("Expiration"); + + b.Property("SubjectId") + .HasMaxLength(200); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50); + + b.HasKey("Key"); + + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); + + b.ToTable("PersistedGrants"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.cs b/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.cs new file mode 100644 index 0000000..f6eff3d --- /dev/null +++ b/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.cs @@ -0,0 +1,63 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.PersistedGrantDb +{ + public partial class _2_5_1_PersistedGrantDBUpdateMigration : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type", + table: "PersistedGrants"); + + migrationBuilder.CreateTable( + name: "DeviceCodes", + columns: table => new + { + UserCode = table.Column(maxLength: 200, nullable: false), + DeviceCode = table.Column(maxLength: 200, nullable: false), + SubjectId = table.Column(maxLength: 200, nullable: true), + ClientId = table.Column(maxLength: 200, nullable: false), + CreationTime = table.Column(nullable: false), + Expiration = table.Column(nullable: false), + Data = table.Column(maxLength: 50000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_DeviceCodes", x => x.UserCode); + }); + + migrationBuilder.CreateIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type_Expiration", + table: "PersistedGrants", + columns: new[] { "SubjectId", "ClientId", "Type", "Expiration" }); + + migrationBuilder.CreateIndex( + name: "IX_DeviceCodes_DeviceCode", + table: "DeviceCodes", + column: "DeviceCode", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_DeviceCodes_Expiration", + table: "DeviceCodes", + column: "Expiration"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "DeviceCodes"); + + migrationBuilder.DropIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type_Expiration", + table: "PersistedGrants"); + + migrationBuilder.CreateIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type", + table: "PersistedGrants", + columns: new[] { "SubjectId", "ClientId", "Type" }); + } + } +} diff --git a/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs b/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs index 9282639..d67e076 100644 --- a/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs +++ b/IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs @@ -15,10 +15,46 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.PersistedGrantDb { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "2.2.0-preview2-35157") + .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b => + { + b.Property("UserCode") + .ValueGeneratedOnAdd() + .HasMaxLength(200); + + b.Property("ClientId") + .IsRequired() + .HasMaxLength(200); + + b.Property("CreationTime"); + + b.Property("Data") + .IsRequired() + .HasMaxLength(50000); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(200); + + b.Property("Expiration") + .IsRequired(); + + b.Property("SubjectId") + .HasMaxLength(200); + + b.HasKey("UserCode"); + + b.HasIndex("DeviceCode") + .IsUnique(); + + b.HasIndex("Expiration"); + + b.ToTable("DeviceCodes"); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => { b.Property("Key") @@ -45,7 +81,7 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.PersistedGrantDb b.HasKey("Key"); - b.HasIndex("SubjectId", "ClientId", "Type"); + b.HasIndex("SubjectId", "ClientId", "Type", "Expiration"); b.ToTable("PersistedGrants"); }); diff --git a/IdentityServer/IdentityServer.csproj b/IdentityServer/IdentityServer.csproj index b209ac9..183b186 100644 --- a/IdentityServer/IdentityServer.csproj +++ b/IdentityServer/IdentityServer.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 Teknik.IdentityServer Teknik.IdentityServer win-x86;win-x64;linux-x64;linux-arm;osx-x64 @@ -15,12 +15,12 @@ - - - - - - + + + + + + diff --git a/IdentityServer/Program.cs b/IdentityServer/Program.cs index 2c3c7e8..2c8843c 100644 --- a/IdentityServer/Program.cs +++ b/IdentityServer/Program.cs @@ -1,6 +1,10 @@ using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using System.IO; +using Teknik.Configuration; +using Teknik.Logging; namespace Teknik.IdentityServer { @@ -21,6 +25,12 @@ namespace Teknik.IdentityServer return WebHost.CreateDefaultBuilder(args) .UseConfiguration(config) .UseStartup() + .ConfigureLogging((hostingContext, logging) => + { + string baseDir = hostingContext.HostingEnvironment.ContentRootPath; + string dataDir = Path.Combine(baseDir, "App_Data"); + logging.AddProvider(new LoggerProvider(Config.Load(dataDir))); + }) .Build(); } } diff --git a/IdentityServer/Properties/PublishProfiles/Teknik Identity - Development.pubxml b/IdentityServer/Properties/PublishProfiles/Teknik Identity - Development.pubxml index 991d392..2a5f102 100644 --- a/IdentityServer/Properties/PublishProfiles/Teknik Identity - Development.pubxml +++ b/IdentityServer/Properties/PublishProfiles/Teknik Identity - Development.pubxml @@ -11,7 +11,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt https://authdev.teknik.io True True - netcoreapp2.1 + netcoreapp2.2 05842e03-223a-4f43-9e81-d968a9475a97 false <_IsPortable>true diff --git a/IdentityServer/Properties/launchSettings.json b/IdentityServer/Properties/launchSettings.json index ed61191..6b041d7 100644 --- a/IdentityServer/Properties/launchSettings.json +++ b/IdentityServer/Properties/launchSettings.json @@ -1,35 +1,35 @@ { - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "https://localhost:44350/", - "sslPort": 44350 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "https://localhost:44350/", + "sslPort": 44350 + } }, - "IdentityServer": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:9002/" - }, - "IdentityServer - Prod": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Production" - }, - "applicationUrl": "https://localhost:9002/" + "profiles": { + "IdentityServer": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:9002/" + }, + "IdentityServer - Prod": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Production" + }, + "applicationUrl": "https://localhost:9002/" + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } } - } } \ No newline at end of file diff --git a/IdentityServer/Startup.cs b/IdentityServer/Startup.cs index 26b2283..f2bb5dd 100644 --- a/IdentityServer/Startup.cs +++ b/IdentityServer/Startup.cs @@ -172,11 +172,8 @@ namespace Teknik.IdentityServer services.AddTransient(); } - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, Config config) + public void Configure(IApplicationBuilder app, IHostingEnvironment env, Config config) { - // Initiate Logging - loggerFactory.AddLogger(config); - // Setup the HttpContext app.UseHttpContextSetup(); diff --git a/Logging/Logging.csproj b/Logging/Logging.csproj index ff1aa6b..6d90058 100644 --- a/Logging/Logging.csproj +++ b/Logging/Logging.csproj @@ -1,13 +1,17 @@  - netcoreapp2.1 + netcoreapp2.2 Teknik.Logging Teknik.Logging win-x86;win-x64;linux-x64;linux-arm;osx-x64 Debug;Release;Test + + + + diff --git a/ServiceWorker/ServiceWorker.csproj b/ServiceWorker/ServiceWorker.csproj index f961e5e..a4ab6e0 100644 --- a/ServiceWorker/ServiceWorker.csproj +++ b/ServiceWorker/ServiceWorker.csproj @@ -1,8 +1,8 @@ - + Exe - netcoreapp2.1 + netcoreapp2.2 Teknik.ServiceWorker Teknik.ServiceWorker diff --git a/Teknik.sln b/Teknik.sln index 74a8e9d..281d083 100644 --- a/Teknik.sln +++ b/Teknik.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27512.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29123.88 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Teknik", "Teknik\Teknik.csproj", "{1E52F0D0-9E89-4022-A905-C685EF3564E1}" EndProject @@ -29,10 +29,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitService", "GitService\Gi EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceWorker", "ServiceWorker\ServiceWorker.csproj", "{0B712243-994C-4AC3-893C-B86B59F63F53}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityServer", "IdentityServer\IdentityServer.csproj", "{3434645B-B8B4-457A-8C85-342E6727CCEE}" +EndProject Global - GlobalSection(Performance) = preSolution - HasPerformanceSessions = true - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU @@ -87,6 +86,12 @@ Global {0B712243-994C-4AC3-893C-B86B59F63F53}.Release|Any CPU.Build.0 = Release|Any CPU {0B712243-994C-4AC3-893C-B86B59F63F53}.Test|Any CPU.ActiveCfg = Debug|Any CPU {0B712243-994C-4AC3-893C-B86B59F63F53}.Test|Any CPU.Build.0 = Debug|Any CPU + {3434645B-B8B4-457A-8C85-342E6727CCEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3434645B-B8B4-457A-8C85-342E6727CCEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3434645B-B8B4-457A-8C85-342E6727CCEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3434645B-B8B4-457A-8C85-342E6727CCEE}.Release|Any CPU.Build.0 = Release|Any CPU + {3434645B-B8B4-457A-8C85-342E6727CCEE}.Test|Any CPU.ActiveCfg = Test|Any CPU + {3434645B-B8B4-457A-8C85-342E6727CCEE}.Test|Any CPU.Build.0 = Test|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -94,4 +99,7 @@ Global GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D5D09AC6-1E27-476C-BF7E-980E1640F432} EndGlobalSection + GlobalSection(Performance) = preSolution + HasPerformanceSessions = true + EndGlobalSection EndGlobal diff --git a/Teknik/Program.cs b/Teknik/Program.cs index 59ca1f0..e0a3196 100644 --- a/Teknik/Program.cs +++ b/Teknik/Program.cs @@ -7,6 +7,8 @@ using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; +using Teknik.Configuration; +using Teknik.Logging; namespace Teknik { @@ -28,6 +30,12 @@ namespace Teknik .UseConfiguration(config) .UseIISIntegration() .UseStartup() + .ConfigureLogging((hostingContext, logging) => + { + string baseDir = hostingContext.HostingEnvironment.ContentRootPath; + string dataDir = Path.Combine(baseDir, "App_Data"); + logging.AddProvider(new LoggerProvider(Config.Load(dataDir))); + }) .Build(); } } diff --git a/Teknik/Properties/PublishProfiles/Teknik - Development.pubxml b/Teknik/Properties/PublishProfiles/Teknik - Development.pubxml index 415ebe3..f3c8b79 100644 --- a/Teknik/Properties/PublishProfiles/Teknik - Development.pubxml +++ b/Teknik/Properties/PublishProfiles/Teknik - Development.pubxml @@ -11,7 +11,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt https://dev.teknik.io/ True True - netcoreapp2.1 + netcoreapp2.2 1e52f0d0-9e89-4022-a905-c685ef3564e1 false <_IsPortable>true diff --git a/Teknik/Properties/launchSettings.json b/Teknik/Properties/launchSettings.json index 9f1fe79..1d15ded 100644 --- a/Teknik/Properties/launchSettings.json +++ b/Teknik/Properties/launchSettings.json @@ -1,38 +1,38 @@ { - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "https://localhost:23818", - "sslPort": 44362 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_HTTPS_PORT": "44362", - "ASPNETCORE_ENVIRONMENT": "Development" - } + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "https://localhost:23818", + "sslPort": 44362 + } }, - "TeknikCore": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "?sub=www", - "environmentVariables": { - "ASPNETCORE_URLS": "https://localhost:5050", - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "Teknik - Prod": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "?sub=www", - "environmentVariables": { - "ASPNETCORE_URLS": "https://localhost:5050", - "ASPNETCORE_ENVIRONMENT": "Production" - } + "profiles": { + "TeknikCore": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "?sub=www", + "environmentVariables": { + "ASPNETCORE_URLS": "https://localhost:5050", + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Teknik - Prod": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "?sub=www", + "environmentVariables": { + "ASPNETCORE_URLS": "https://localhost:5050", + "ASPNETCORE_ENVIRONMENT": "Production" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_HTTPS_PORT": "44362", + "ASPNETCORE_ENVIRONMENT": "Development" + } + } } - } } \ No newline at end of file diff --git a/Teknik/Scripts/User/DeveloperSettings.js b/Teknik/Scripts/User/DeveloperSettings.js index 8d1fa38..eb31977 100644 --- a/Teknik/Scripts/User/DeveloperSettings.js +++ b/Teknik/Scripts/User/DeveloperSettings.js @@ -109,7 +109,7 @@ function editClient(clientId) { $('#clientModal').find('#grantType').val(data.client.grantType); _.forEach(data.client.allowedScopes, function (scope) { - $('#clientModal').find('#scopes_' + scope).prop('checked', true); + $('#clientModal').find('input[id="scopes_' + scope + '"]').prop('checked', true); }); $('#clientModal').find('#clientEditSubmit').removeClass('hidden'); diff --git a/Teknik/Startup.cs b/Teknik/Startup.cs index fa1c256..fea41b5 100644 --- a/Teknik/Startup.cs +++ b/Teknik/Startup.cs @@ -131,6 +131,7 @@ namespace Teknik // Compression Response services.Configure(options => options.Level = CompressionLevel.Fastest); services.AddResponseCompression(options => { + options.Providers.Add(); options.Providers.Add(); }); @@ -264,14 +265,11 @@ namespace Teknik } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, TeknikEntities dbContext, Config config) + public void Configure(IApplicationBuilder app, TeknikEntities dbContext, Config config) { // Create and Migrate the database dbContext.Database.Migrate(); - // Initiate Logging - loggerFactory.AddLogger(config); - // Setup the HttpContext app.UseHttpContextSetup(); @@ -289,7 +287,7 @@ namespace Teknik }); // Compress Reponse - //app.UseResponseCompression(); + app.UseResponseCompression(); // Cache Responses //app.UseResponseCaching(); diff --git a/Teknik/Teknik.csproj b/Teknik/Teknik.csproj index 4fc837d..4bd9f18 100644 --- a/Teknik/Teknik.csproj +++ b/Teknik/Teknik.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 aspnet-TeknikCore-BE9563D1-0DFB-4141-903C-287B23FF22C7 Teknik Teknik @@ -31,24 +31,25 @@ - + - - - - - - - + + + + + + + runtime; build; native; contentfiles; analyzers + - - + + - - - + + + diff --git a/Tracking/Tracking.csproj b/Tracking/Tracking.csproj index abc18ba..7d9c79d 100644 --- a/Tracking/Tracking.csproj +++ b/Tracking/Tracking.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 Teknik.Tracking Teknik.Tracking win-x86;win-x64;linux-x64;linux-arm;osx-x64 @@ -11,6 +11,12 @@ + + + + + + diff --git a/Utilities/TagHelpers/BundleTagHelper.cs b/Utilities/TagHelpers/BundleTagHelper.cs index 17bb624..38e298b 100644 --- a/Utilities/TagHelpers/BundleTagHelper.cs +++ b/Utilities/TagHelpers/BundleTagHelper.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Mvc.TagHelpers.Internal; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -75,8 +76,8 @@ namespace Teknik.Utilities.TagHelpers if (AppendVersion) { - var versionProvider = new FileVersionProvider(_env.WebRootFileProvider, _cache, ViewContext.HttpContext.Request.Path); - fullPath = versionProvider.AddFileVersionToPath(fullPath); + var _fileVersionProvider = ViewContext.HttpContext.RequestServices.GetRequiredService(); + fullPath = _fileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.Path, fullPath); } if (file.EndsWith(".js")) diff --git a/Utilities/Utilities.csproj b/Utilities/Utilities.csproj index a28d412..51599b3 100644 --- a/Utilities/Utilities.csproj +++ b/Utilities/Utilities.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 Teknik.Utilities Teknik.Utilities win-x86;win-x64;linux-x64;linux-arm;osx-x64 @@ -9,13 +9,13 @@ - - - + + + - - + + diff --git a/global.json b/global.json index 112ce18..57a91ba 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "2.1.403" + "version": "2.2.401" } } \ No newline at end of file