Преглед изворни кода

Updated to .NET Core 2.2 (Except MVC Routing)

master
Teknikode пре 1 месец
родитељ
комит
b5d5e4afbe
26 измењених фајлова са 1124 додато и 122 уклоњено
  1. 2
    2
      Configuration/Configuration.csproj
  2. 1
    1
      GitService/GitService.csproj
  3. 692
    0
      IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.Designer.cs
  4. 72
    0
      IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.cs
  5. 14
    1
      IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs
  6. 93
    0
      IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.Designer.cs
  7. 63
    0
      IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.cs
  8. 38
    2
      IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs
  9. 7
    7
      IdentityServer/IdentityServer.csproj
  10. 10
    0
      IdentityServer/Program.cs
  11. 1
    1
      IdentityServer/Properties/PublishProfiles/Teknik Identity - Development.pubxml
  12. 31
    31
      IdentityServer/Properties/launchSettings.json
  13. 1
    4
      IdentityServer/Startup.cs
  14. 5
    1
      Logging/Logging.csproj
  15. 2
    2
      ServiceWorker/ServiceWorker.csproj
  16. 13
    5
      Teknik.sln
  17. 8
    0
      Teknik/Program.cs
  18. 1
    1
      Teknik/Properties/PublishProfiles/Teknik - Development.pubxml
  19. 34
    34
      Teknik/Properties/launchSettings.json
  20. 1
    1
      Teknik/Scripts/User/DeveloperSettings.js
  21. 3
    5
      Teknik/Startup.cs
  22. 15
    14
      Teknik/Teknik.csproj
  23. 7
    1
      Tracking/Tracking.csproj
  24. 3
    2
      Utilities/TagHelpers/BundleTagHelper.cs
  25. 6
    6
      Utilities/Utilities.csproj
  26. 1
    1
      global.json

+ 2
- 2
Configuration/Configuration.csproj Прегледај датотеку

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>Teknik.Configuration</RootNamespace>
<AssemblyName>Teknik.Configuration</AssemblyName>
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;linux-arm;osx-x64</RuntimeIdentifiers>
@@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
</ItemGroup>

<ItemGroup>

+ 1
- 1
GitService/GitService.csproj Прегледај датотеку

@@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="MySql.Data" Version="8.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
</ItemGroup>

</Project>

+ 692
- 0
IdentityServer/Data/Migrations/IdentityServer/ConfigurationDb/20190804060515_2_5_1_ConfigDBUpdateMigration.Designer.cs Прегледај датотеку

@@ -0,0 +1,692 @@
// <auto-generated />
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<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<DateTime>("Created");

b.Property<string>("Description")
.HasMaxLength(1000);

b.Property<string>("DisplayName")
.HasMaxLength(200);

b.Property<bool>("Enabled");

b.Property<DateTime?>("LastAccessed");

b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200);

b.Property<bool>("NonEditable");

b.Property<DateTime?>("Updated");

b.HasKey("Id");

b.HasIndex("Name")
.IsUnique();

b.ToTable("ApiResources");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResourceClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ApiResourceId");

b.Property<string>("Type")
.IsRequired()
.HasMaxLength(200);

b.HasKey("Id");

b.HasIndex("ApiResourceId");

b.ToTable("ApiClaims");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResourceProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ApiResourceId");

b.Property<string>("Key")
.IsRequired()
.HasMaxLength(250);

b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2000);

b.HasKey("Id");

b.HasIndex("ApiResourceId");

b.ToTable("ApiProperties");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ApiResourceId");

b.Property<string>("Description")
.HasMaxLength(1000);

b.Property<string>("DisplayName")
.HasMaxLength(200);

b.Property<bool>("Emphasize");

b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200);

b.Property<bool>("Required");

b.Property<bool>("ShowInDiscoveryDocument");

b.HasKey("Id");

b.HasIndex("ApiResourceId");

b.HasIndex("Name")
.IsUnique();

b.ToTable("ApiScopes");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiScopeClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ApiScopeId");

b.Property<string>("Type")
.IsRequired()
.HasMaxLength(200);

b.HasKey("Id");

b.HasIndex("ApiScopeId");

b.ToTable("ApiScopeClaims");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiSecret", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ApiResourceId");

b.Property<DateTime>("Created");

b.Property<string>("Description")
.HasMaxLength(1000);

b.Property<DateTime?>("Expiration");

b.Property<string>("Type")
.IsRequired()
.HasMaxLength(250);

b.Property<string>("Value")
.IsRequired()
.HasMaxLength(4000);

b.HasKey("Id");

b.HasIndex("ApiResourceId");

b.ToTable("ApiSecrets");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("AbsoluteRefreshTokenLifetime");

b.Property<int>("AccessTokenLifetime");

b.Property<int>("AccessTokenType");

b.Property<bool>("AllowAccessTokensViaBrowser");

b.Property<bool>("AllowOfflineAccess");

b.Property<bool>("AllowPlainTextPkce");

b.Property<bool>("AllowRememberConsent");

b.Property<bool>("AlwaysIncludeUserClaimsInIdToken");

b.Property<bool>("AlwaysSendClientClaims");

b.Property<int>("AuthorizationCodeLifetime");

b.Property<bool>("BackChannelLogoutSessionRequired");

b.Property<string>("BackChannelLogoutUri")
.HasMaxLength(2000);

b.Property<string>("ClientClaimsPrefix")
.HasMaxLength(200);

b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200);

b.Property<string>("ClientName")
.HasMaxLength(200);

b.Property<string>("ClientUri")
.HasMaxLength(2000);

b.Property<int?>("ConsentLifetime");

b.Property<DateTime>("Created");

b.Property<string>("Description")
.HasMaxLength(1000);

b.Property<int>("DeviceCodeLifetime");

b.Property<bool>("EnableLocalLogin");

b.Property<bool>("Enabled");

b.Property<bool>("FrontChannelLogoutSessionRequired");

b.Property<string>("FrontChannelLogoutUri")
.HasMaxLength(2000);

b.Property<int>("IdentityTokenLifetime");

b.Property<bool>("IncludeJwtId");

b.Property<DateTime?>("LastAccessed");

b.Property<string>("LogoUri")
.HasMaxLength(2000);

b.Property<bool>("NonEditable");

b.Property<string>("PairWiseSubjectSalt")
.HasMaxLength(200);

b.Property<string>("ProtocolType")
.IsRequired()
.HasMaxLength(200);

b.Property<int>("RefreshTokenExpiration");

b.Property<int>("RefreshTokenUsage");

b.Property<bool>("RequireClientSecret");

b.Property<bool>("RequireConsent");

b.Property<bool>("RequirePkce");

b.Property<int>("SlidingRefreshTokenLifetime");

b.Property<bool>("UpdateAccessTokenClaimsOnRefresh");

b.Property<DateTime?>("Updated");

b.Property<string>("UserCodeType")
.HasMaxLength(100);

b.Property<int?>("UserSsoLifetime");

b.HasKey("Id");

b.HasIndex("ClientId")
.IsUnique();

b.ToTable("Clients");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<string>("Type")
.IsRequired()
.HasMaxLength(250);

b.Property<string>("Value")
.IsRequired()
.HasMaxLength(250);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientClaims");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientCorsOrigin", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<string>("Origin")
.IsRequired()
.HasMaxLength(150);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientCorsOrigins");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientGrantType", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<string>("GrantType")
.IsRequired()
.HasMaxLength(250);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientGrantTypes");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientIdPRestriction", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<string>("Provider")
.IsRequired()
.HasMaxLength(200);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientIdPRestrictions");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientPostLogoutRedirectUri", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<string>("PostLogoutRedirectUri")
.IsRequired()
.HasMaxLength(2000);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientPostLogoutRedirectUris");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<string>("Key")
.IsRequired()
.HasMaxLength(250);

b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2000);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientProperties");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<string>("RedirectUri")
.IsRequired()
.HasMaxLength(2000);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientRedirectUris");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<string>("Scope")
.IsRequired()
.HasMaxLength(200);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientScopes");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientSecret", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("ClientId");

b.Property<DateTime>("Created");

b.Property<string>("Description")
.HasMaxLength(2000);

b.Property<DateTime?>("Expiration");

b.Property<string>("Type")
.IsRequired()
.HasMaxLength(250);

b.Property<string>("Value")
.IsRequired()
.HasMaxLength(4000);

b.HasKey("Id");

b.HasIndex("ClientId");

b.ToTable("ClientSecrets");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.IdentityClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("IdentityResourceId");

b.Property<string>("Type")
.IsRequired()
.HasMaxLength(200);

b.HasKey("Id");

b.HasIndex("IdentityResourceId");

b.ToTable("IdentityClaims");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.IdentityResource", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<DateTime>("Created");

b.Property<string>("Description")
.HasMaxLength(1000);

b.Property<string>("DisplayName")
.HasMaxLength(200);

b.Property<bool>("Emphasize");

b.Property<bool>("Enabled");

b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200);

b.Property<bool>("NonEditable");

b.Property<bool>("Required");

b.Property<bool>("ShowInDiscoveryDocument");

b.Property<DateTime?>("Updated");

b.HasKey("Id");

b.HasIndex("Name")
.IsUnique();

b.ToTable("IdentityResources");
});

modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.IdentityResourceProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

b.Property<int>("IdentityResourceId");

b.Property<string>("Key")
.IsRequired()
.HasMaxLength(250);

b.Property<string>("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
}
}
}

+ 72
- 0
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<bool>(
name: "NonEditable",
table: "IdentityResources",
nullable: false,
defaultValue: false);

migrationBuilder.AddColumn<int>(
name: "DeviceCodeLifetime",
table: "Clients",
nullable: false,
defaultValue: 0);

migrationBuilder.AddColumn<bool>(
name: "NonEditable",
table: "Clients",
nullable: false,
defaultValue: false);

migrationBuilder.AddColumn<string>(
name: "UserCodeType",
table: "Clients",
maxLength: 100,
nullable: true);

migrationBuilder.AddColumn<int>(
name: "UserSsoLifetime",
table: "Clients",
nullable: true);

migrationBuilder.AddColumn<bool>(
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");
}
}
}

+ 14
- 1
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<bool>("NonEditable");

b.Property<DateTime?>("Updated");

b.HasKey("Id");
@@ -227,6 +229,8 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb
b.Property<string>("Description")
.HasMaxLength(1000);

b.Property<int>("DeviceCodeLifetime");

b.Property<bool>("EnableLocalLogin");

b.Property<bool>("Enabled");
@@ -245,6 +249,8 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb
b.Property<string>("LogoUri")
.HasMaxLength(2000);

b.Property<bool>("NonEditable");

b.Property<string>("PairWiseSubjectSalt")
.HasMaxLength(200);

@@ -268,6 +274,11 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb

b.Property<DateTime?>("Updated");

b.Property<string>("UserCodeType")
.HasMaxLength(100);

b.Property<int?>("UserSsoLifetime");

b.HasKey("Id");

b.HasIndex("ClientId")
@@ -507,6 +518,8 @@ namespace Teknik.IdentityServer.Data.Migrations.IdentityServer.ConfigurationDb
.IsRequired()
.HasMaxLength(200);

b.Property<bool>("NonEditable");

b.Property<bool>("Required");

b.Property<bool>("ShowInDiscoveryDocument");

+ 93
- 0
IdentityServer/Data/Migrations/IdentityServer/PersistedGrantDb/20190804060703_2_5_1_PersistedGrantDBUpdateMigration.Designer.cs Прегледај датотеку

@@ -0,0 +1,93 @@
// <auto-generated />
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<string>("UserCode")
.ValueGeneratedOnAdd()
.HasMaxLength(200);

b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200);

b.Property<DateTime>("CreationTime");

b.Property<string>("Data")
.IsRequired()
.HasMaxLength(50000);

b.Property<string>("DeviceCode")
.IsRequired()
.HasMaxLength(200);

b.Property<DateTime?>("Expiration")
.IsRequired();

b.Property<string>("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<string>("Key")
.HasMaxLength(200);

b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200);

b.Property<DateTime>("CreationTime");

b.Property<string>("Data")
.IsRequired()
.HasMaxLength(50000);

b.Property<DateTime?>("Expiration");

b.Property<string>("SubjectId")
.HasMaxLength(200);

b.Property<string>("Type")
.IsRequired()
.HasMaxLength(50);

b.HasKey("Key");

b.HasIndex("SubjectId", "ClientId", "Type", "Expiration");

b.ToTable("PersistedGrants");
});
#pragma warning restore 612, 618
}
}
}

+ 63
- 0
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<string>(maxLength: 200, nullable: false),
DeviceCode = table.Column<string>(maxLength: 200, nullable: false),
SubjectId = table.Column<string>(maxLength: 200, nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
CreationTime = table.Column<DateTime>(nullable: false),
Expiration = table.Column<DateTime>(nullable: false),
Data = table.Column<string>(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" });
}
}
}

+ 38
- 2
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<string>("UserCode")
.ValueGeneratedOnAdd()
.HasMaxLength(200);

b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200);

b.Property<DateTime>("CreationTime");

b.Property<string>("Data")
.IsRequired()
.HasMaxLength(50000);

b.Property<string>("DeviceCode")
.IsRequired()
.HasMaxLength(200);

b.Property<DateTime?>("Expiration")
.IsRequired();

b.Property<string>("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<string>("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");
});

+ 7
- 7
IdentityServer/IdentityServer.csproj Прегледај датотеку

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AssemblyName>Teknik.IdentityServer</AssemblyName>
<RootNamespace>Teknik.IdentityServer</RootNamespace>
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;linux-arm;osx-x64</RuntimeIdentifiers>
@@ -15,12 +15,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="IdentityServer4" Version="2.3.0-preview1-update2" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="2.7.0-preview1" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.3.0-preview1-update2" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.3.0-preview1-update1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.5" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.5" />
<PackageReference Include="IdentityServer4" Version="2.5.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="2.7.0" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.5.1" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.5.1" />
<PackageReference Include="Microsoft.AspNetCore.All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
</ItemGroup>

<ItemGroup>

+ 10
- 0
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<Startup>()
.ConfigureLogging((hostingContext, logging) =>
{
string baseDir = hostingContext.HostingEnvironment.ContentRootPath;
string dataDir = Path.Combine(baseDir, "App_Data");
logging.AddProvider(new LoggerProvider(Config.Load(dataDir)));
})
.Build();
}
}

+ 1
- 1
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
<SiteUrlToLaunchAfterPublish>https://authdev.teknik.io</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ProjectGuid>05842e03-223a-4f43-9e81-d968a9475a97</ProjectGuid>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>

+ 31
- 31
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"
}
},
"IdentityServer": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:9002/"
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:44350/",
"sslPort": 44350
}
},
"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"
}
}
}
}
}

+ 1
- 4
IdentityServer/Startup.cs Прегледај датотеку

@@ -172,11 +172,8 @@ namespace Teknik.IdentityServer
services.AddTransient<IProfileService, TeknikProfileService>();
}
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();


+ 5
- 1
Logging/Logging.csproj Прегледај датотеку

@@ -1,13 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AssemblyName>Teknik.Logging</AssemblyName>
<RootNamespace>Teknik.Logging</RootNamespace>
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;linux-arm;osx-x64</RuntimeIdentifiers>
<Configurations>Debug;Release;Test</Configurations>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Configuration\Configuration.csproj" />
<ProjectReference Include="..\Utilities\Utilities.csproj" />

+ 2
- 2
ServiceWorker/ServiceWorker.csproj Прегледај датотеку

@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>Teknik.ServiceWorker</RootNamespace>
<AssemblyName>Teknik.ServiceWorker</AssemblyName>
</PropertyGroup>

+ 13
- 5
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

+ 8
- 0
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<Startup>()
.ConfigureLogging((hostingContext, logging) =>
{
string baseDir = hostingContext.HostingEnvironment.ContentRootPath;
string dataDir = Path.Combine(baseDir, "App_Data");
logging.AddProvider(new LoggerProvider(Config.Load(dataDir)));
})
.Build();
}
}

+ 1
- 1
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
<SiteUrlToLaunchAfterPublish>https://dev.teknik.io/</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ProjectGuid>1e52f0d0-9e89-4022-a905-c685ef3564e1</ProjectGuid>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>

+ 34
- 34
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"
}
},
"TeknikCore": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "?sub=www",
"environmentVariables": {
"ASPNETCORE_URLS": "https://localhost:5050",
"ASPNETCORE_ENVIRONMENT": "Development"
}
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:23818",
"sslPort": 44362
}
},
"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"
}
}
}
}
}

+ 1
- 1
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');

+ 3
- 5
Teknik/Startup.cs Прегледај датотеку

@@ -131,6 +131,7 @@ namespace Teknik
// Compression Response
services.Configure<GzipCompressionProviderOptions>(options => options.Level = CompressionLevel.Fastest);
services.AddResponseCompression(options => {
options.Providers.Add<BrotliCompressionProvider>();
options.Providers.Add<GzipCompressionProvider>();
});

@@ -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();

+ 15
- 14
Teknik/Teknik.csproj Прегледај датотеку

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<UserSecretsId>aspnet-TeknikCore-BE9563D1-0DFB-4141-903C-287B23FF22C7</UserSecretsId>
<RootNamespace>Teknik</RootNamespace>
<AssemblyName>Teknik</AssemblyName>
@@ -31,24 +31,25 @@


<ItemGroup>
<PackageReference Include="IdentityServer4" Version="2.3.1" />
<PackageReference Include="IdentityServer4" Version="2.5.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="2.7.0" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.3.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.3.1" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.6" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.1.0-preview3-35497" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.0-preview3-35497" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.0-preview3-35497" PrivateAssets="all">
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.5.1" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.5.1" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.6" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
<PackageReference Include="Microsoft.SyndicationFeed.ReaderWriter" Version="1.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.6" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" PrivateAssets="All" />
<PackageReference Include="nClam" Version="4.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="QRCoder" Version="1.3.5" />
<PackageReference Include="TwoStepsAuthenticator" Version="1.3.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="QRCoder" Version="1.3.6" />
<PackageReference Include="TwoStepsAuthenticator" Version="1.3.2" />
</ItemGroup>

<ItemGroup>

+ 7
- 1
Tracking/Tracking.csproj Прегледај датотеку

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AssemblyName>Teknik.Tracking</AssemblyName>
<RootNamespace>Teknik.Tracking</RootNamespace>
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;linux-arm;osx-x64</RuntimeIdentifiers>
@@ -11,6 +11,12 @@
<None Remove="lib\Piwik.Tracker.NetStandard1.4.dll" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Configuration\Configuration.csproj" />
<ProjectReference Include="..\Logging\Logging.csproj" />

+ 3
- 2
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<IFileVersionProvider>();
fullPath = _fileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.Path, fullPath);
}

if (file.EndsWith(".js"))

+ 6
- 6
Utilities/Utilities.csproj Прегледај датотеку

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AssemblyName>Teknik.Utilities</AssemblyName>
<RootNamespace>Teknik.Utilities</RootNamespace>
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;linux-arm;osx-x64</RuntimeIdentifiers>
@@ -9,13 +9,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HtmlSanitizer" Version="4.0.199" />
<PackageReference Include="Markdig" Version="0.15.4" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.6" />
<PackageReference Include="HtmlSanitizer" Version="4.0.217" />
<PackageReference Include="Markdig" Version="0.17.1" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Mime-Detective" Version="0.0.6-beta4" />
<PackageReference Include="MySql.Data" Version="8.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.5" />
</ItemGroup>

</Project>

+ 1
- 1
global.json Прегледај датотеку

@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.1.403"
"version": "2.2.401"
}
}

Loading…
Откажи
Сачувај