identity4 2.0 rtm

This commit is contained in:
Igor Sychev 2017-10-08 18:46:05 +01:00 committed by Igor Sychev
parent 8d033f0951
commit 94c043e69a
7 changed files with 36 additions and 29 deletions

View File

@ -20,8 +20,8 @@
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.0.0-rc1" /> <PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.0.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.0.0-rc1" /> <PackageReference Include="IdentityServer4.EntityFramework" Version="2.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />
</ItemGroup> </ItemGroup>

View File

@ -11,8 +11,8 @@ using System;
namespace Identity.API.Migrations.ConfigurationDb namespace Identity.API.Migrations.ConfigurationDb
{ {
[DbContext(typeof(ConfigurationDbContext))] [DbContext(typeof(ConfigurationDbContext))]
[Migration("20170912114152_Initial")] [Migration("20170927170433_Config")]
partial class Initial partial class Config
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
{ {
@ -171,7 +171,11 @@ namespace Identity.API.Migrations.ConfigurationDb
b.Property<bool>("BackChannelLogoutSessionRequired"); b.Property<bool>("BackChannelLogoutSessionRequired");
b.Property<string>("BackChannelLogoutUri"); b.Property<string>("BackChannelLogoutUri")
.HasMaxLength(2000);
b.Property<string>("ClientClaimsPrefix")
.HasMaxLength(200);
b.Property<string>("ClientId") b.Property<string>("ClientId")
.IsRequired() .IsRequired()
@ -194,17 +198,18 @@ namespace Identity.API.Migrations.ConfigurationDb
b.Property<bool>("FrontChannelLogoutSessionRequired"); b.Property<bool>("FrontChannelLogoutSessionRequired");
b.Property<string>("FrontChannelLogoutUri"); b.Property<string>("FrontChannelLogoutUri")
.HasMaxLength(2000);
b.Property<int>("IdentityTokenLifetime"); b.Property<int>("IdentityTokenLifetime");
b.Property<bool>("IncludeJwtId"); b.Property<bool>("IncludeJwtId");
b.Property<string>("LogoUri"); b.Property<string>("LogoUri")
.HasMaxLength(2000);
b.Property<string>("NormalizedClientId"); b.Property<string>("PairWiseSubjectSalt")
.HasMaxLength(200);
b.Property<bool>("PrefixClientClaims");
b.Property<string>("ProtocolType") b.Property<string>("ProtocolType")
.IsRequired() .IsRequired()

View File

@ -1,11 +1,10 @@
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using System; using System;
using System.Collections.Generic;
namespace Identity.API.Migrations.ConfigurationDb namespace Identity.API.Migrations.ConfigurationDb
{ {
public partial class Initial : Migration public partial class Config : Migration
{ {
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {
@ -42,7 +41,8 @@ namespace Identity.API.Migrations.ConfigurationDb
AlwaysSendClientClaims = table.Column<bool>(type: "bit", nullable: false), AlwaysSendClientClaims = table.Column<bool>(type: "bit", nullable: false),
AuthorizationCodeLifetime = table.Column<int>(type: "int", nullable: false), AuthorizationCodeLifetime = table.Column<int>(type: "int", nullable: false),
BackChannelLogoutSessionRequired = table.Column<bool>(type: "bit", nullable: false), BackChannelLogoutSessionRequired = table.Column<bool>(type: "bit", nullable: false),
BackChannelLogoutUri = table.Column<string>(type: "nvarchar(max)", nullable: true), BackChannelLogoutUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
ClientClaimsPrefix = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), ClientId = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
ClientName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true), ClientName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ClientUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true), ClientUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
@ -51,12 +51,11 @@ namespace Identity.API.Migrations.ConfigurationDb
EnableLocalLogin = table.Column<bool>(type: "bit", nullable: false), EnableLocalLogin = table.Column<bool>(type: "bit", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false), Enabled = table.Column<bool>(type: "bit", nullable: false),
FrontChannelLogoutSessionRequired = table.Column<bool>(type: "bit", nullable: false), FrontChannelLogoutSessionRequired = table.Column<bool>(type: "bit", nullable: false),
FrontChannelLogoutUri = table.Column<string>(type: "nvarchar(max)", nullable: true), FrontChannelLogoutUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
IdentityTokenLifetime = table.Column<int>(type: "int", nullable: false), IdentityTokenLifetime = table.Column<int>(type: "int", nullable: false),
IncludeJwtId = table.Column<bool>(type: "bit", nullable: false), IncludeJwtId = table.Column<bool>(type: "bit", nullable: false),
LogoUri = table.Column<string>(type: "nvarchar(max)", nullable: true), LogoUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
NormalizedClientId = table.Column<string>(type: "nvarchar(max)", nullable: true), PairWiseSubjectSalt = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
PrefixClientClaims = table.Column<bool>(type: "bit", nullable: false),
ProtocolType = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), ProtocolType = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
RefreshTokenExpiration = table.Column<int>(type: "int", nullable: false), RefreshTokenExpiration = table.Column<int>(type: "int", nullable: false),
RefreshTokenUsage = table.Column<int>(type: "int", nullable: false), RefreshTokenUsage = table.Column<int>(type: "int", nullable: false),

View File

@ -170,7 +170,11 @@ namespace Identity.API.Migrations.ConfigurationDb
b.Property<bool>("BackChannelLogoutSessionRequired"); b.Property<bool>("BackChannelLogoutSessionRequired");
b.Property<string>("BackChannelLogoutUri"); b.Property<string>("BackChannelLogoutUri")
.HasMaxLength(2000);
b.Property<string>("ClientClaimsPrefix")
.HasMaxLength(200);
b.Property<string>("ClientId") b.Property<string>("ClientId")
.IsRequired() .IsRequired()
@ -193,17 +197,18 @@ namespace Identity.API.Migrations.ConfigurationDb
b.Property<bool>("FrontChannelLogoutSessionRequired"); b.Property<bool>("FrontChannelLogoutSessionRequired");
b.Property<string>("FrontChannelLogoutUri"); b.Property<string>("FrontChannelLogoutUri")
.HasMaxLength(2000);
b.Property<int>("IdentityTokenLifetime"); b.Property<int>("IdentityTokenLifetime");
b.Property<bool>("IncludeJwtId"); b.Property<bool>("IncludeJwtId");
b.Property<string>("LogoUri"); b.Property<string>("LogoUri")
.HasMaxLength(2000);
b.Property<string>("NormalizedClientId"); b.Property<string>("PairWiseSubjectSalt")
.HasMaxLength(200);
b.Property<bool>("PrefixClientClaims");
b.Property<string>("ProtocolType") b.Property<string>("ProtocolType")
.IsRequired() .IsRequired()

View File

@ -10,8 +10,8 @@ using System;
namespace Identity.API.Migrations.PersistedGrantDb namespace Identity.API.Migrations.PersistedGrantDb
{ {
[DbContext(typeof(PersistedGrantDbContext))] [DbContext(typeof(PersistedGrantDbContext))]
[Migration("20170912114120_Initial")] [Migration("20170927170423_Grants")]
partial class Initial partial class Grants
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
{ {

View File

@ -1,10 +1,9 @@
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using System; using System;
using System.Collections.Generic;
namespace Identity.API.Migrations.PersistedGrantDb namespace Identity.API.Migrations.PersistedGrantDb
{ {
public partial class Initial : Migration public partial class Grants : Migration
{ {
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {

View File

@ -51,8 +51,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
services.AddIdentity<ApplicationUser, IdentityRole>() services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>() .AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders() .AddDefaultTokenProviders();
.AddIdentityServer();
services.Configure<AppSettings>(Configuration); services.Configure<AppSettings>(Configuration);