Update Identity server dependency for preview4 (dotnet/aspnetcore#9104)
* Updates Identity server dependency for preview4 * Infrastructure improvements. * Updates react versions. * Updates migrations. * Makes templates show up in Visual Studio Commit migrated from dotnet/aspnetcore@4abf766c3c
This commit is contained in:
Родитель
6808c06d83
Коммит
fb65a15ec1
|
@ -21,6 +21,11 @@
|
|||
"auth": "None",
|
||||
"authenticationType": "NoAuth",
|
||||
"allowUnsecured": true
|
||||
},
|
||||
{
|
||||
"auth": "Individual",
|
||||
"authenticationType": "IndividualAuth",
|
||||
"b2cAuthenticationOptions": "Local"
|
||||
}
|
||||
],
|
||||
"ports": [
|
||||
|
@ -36,4 +41,4 @@
|
|||
"excludeLaunchSettings": false,
|
||||
"minFullFrameworkVersion": "4.6.1",
|
||||
"disableHttpsSymbol": "NoHttps"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,10 @@ interface IAuthenticationState {
|
|||
providedIn: 'root'
|
||||
})
|
||||
export class AuthorizeService {
|
||||
// By default pop ups are disabled because they don't work properly on Edge.
|
||||
// If you want to enable pop up authentication simply set this flag to false.
|
||||
|
||||
private popUpDisabled = true;
|
||||
private userManager: UserManager;
|
||||
private userSubject: BehaviorSubject<IUser | null> = new BehaviorSubject(null);
|
||||
|
||||
|
@ -90,6 +94,9 @@ export class AuthorizeService {
|
|||
console.log('Silent authentication error: ', silentError);
|
||||
|
||||
try {
|
||||
if (this.popUpDisabled) {
|
||||
throw new Error('Popup disabled. Change \'authorize.service.ts:AuthorizeService.popupDisabled\' to false to enable it.');
|
||||
}
|
||||
user = await this.userManager.signinPopup(this.createArguments(LoginMode.PopUp));
|
||||
this.userSubject.next(user.profile);
|
||||
return this.success(state);
|
||||
|
@ -97,8 +104,9 @@ export class AuthorizeService {
|
|||
if (popupError.message === 'Popup window closed') {
|
||||
// The user explicitly cancelled the login action by closing an opened popup.
|
||||
return this.error('The user closed the window.');
|
||||
} else if (!this.popUpDisabled) {
|
||||
console.log('Popup authentication error: ', popupError);
|
||||
}
|
||||
console.log('Popup authentication error: ', popupError);
|
||||
|
||||
// PopUps might be blocked by the user, fallback to redirect
|
||||
try {
|
||||
|
@ -174,6 +182,7 @@ export class AuthorizeService {
|
|||
throw new Error(`Invalid login mode '${mode}'.`);
|
||||
}
|
||||
}
|
||||
|
||||
// We try to sign out the user in two different ways:
|
||||
// 1) We try to do a sign-out using a PopUp Window. This might fail if there is a
|
||||
// Pop-Up blocker or the user has disabled PopUps.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// <auto-generated />
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Company.WebApplication1.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -17,14 +17,13 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview.19080.1")
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
|
@ -75,7 +74,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||
{
|
||||
b.Property<string>("UserCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(200);
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
|
@ -103,9 +101,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
b.HasIndex("DeviceCode")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceCodes");
|
||||
});
|
||||
|
||||
|
@ -142,8 +137,7 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
@ -256,47 +250,53 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
|
|
@ -232,12 +232,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
column: "DeviceCode",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DeviceCodes_UserCode",
|
||||
table: "DeviceCodes",
|
||||
column: "UserCode",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PersistedGrants_SubjectId_ClientId_Type",
|
||||
table: "PersistedGrants",
|
||||
|
|
|
@ -15,14 +15,13 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview.19080.1")
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
|
@ -73,7 +72,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||
{
|
||||
b.Property<string>("UserCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(200);
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
|
@ -101,9 +99,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
b.HasIndex("DeviceCode")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceCodes");
|
||||
});
|
||||
|
||||
|
@ -140,8 +135,7 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
@ -254,47 +248,53 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// <auto-generated />
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Company.WebApplication1.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -16,12 +16,11 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview.19080.1");
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3");
|
||||
|
||||
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
|
@ -71,7 +70,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||
{
|
||||
b.Property<string>("UserCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(200);
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
|
@ -99,9 +97,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
b.HasIndex("DeviceCode")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceCodes");
|
||||
});
|
||||
|
||||
|
@ -138,8 +133,7 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
@ -249,47 +243,53 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
|
|
@ -229,12 +229,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
column: "DeviceCode",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DeviceCodes_UserCode",
|
||||
table: "DeviceCodes",
|
||||
column: "UserCode",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PersistedGrants_SubjectId_ClientId_Type",
|
||||
table: "PersistedGrants",
|
||||
|
|
|
@ -14,12 +14,11 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview.19080.1");
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3");
|
||||
|
||||
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
|
@ -69,7 +68,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||
{
|
||||
b.Property<string>("UserCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(200);
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
|
@ -97,9 +95,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
b.HasIndex("DeviceCode")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceCodes");
|
||||
});
|
||||
|
||||
|
@ -136,8 +131,7 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
@ -247,47 +241,53 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
"auth": "None",
|
||||
"authenticationType": "NoAuth",
|
||||
"allowUnsecured": true
|
||||
},
|
||||
{
|
||||
"auth": "Individual",
|
||||
"authenticationType": "IndividualAuth",
|
||||
"b2cAuthenticationOptions": "Local"
|
||||
}
|
||||
],
|
||||
"ports": [
|
||||
|
@ -36,4 +41,4 @@
|
|||
"excludeLaunchSettings": false,
|
||||
"minFullFrameworkVersion": "4.6.1",
|
||||
"disableHttpsSymbol": "NoHttps"
|
||||
}
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -11,17 +11,17 @@
|
|||
"react-dom": "^16.0.0",
|
||||
"react-router-bootstrap": "^0.24.4",
|
||||
"react-router-dom": "^4.2.2",
|
||||
"react-scripts": "^1.1.5",
|
||||
"react-scripts": "^2.1.8",
|
||||
"reactstrap": "^6.3.0",
|
||||
"rimraf": "^2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ajv": "^6.0.0",
|
||||
"babel-eslint": "^7.2.3",
|
||||
"ajv": "^6.9.1",
|
||||
"babel-eslint": "^9.0.0",
|
||||
"cross-env": "^5.2.0",
|
||||
"eslint": "^4.1.1",
|
||||
"eslint-config-react-app": "^2.1.0",
|
||||
"eslint-plugin-flowtype": "^2.50.3",
|
||||
"eslint": "^5.12.0",
|
||||
"eslint-config-react-app": "^3.0.8",
|
||||
"eslint-plugin-flowtype": "^3.5.1",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-jsx-a11y": "^5.1.1",
|
||||
"eslint-plugin-react": "^7.11.1"
|
||||
|
|
|
@ -7,6 +7,10 @@ export class AuthorizeService {
|
|||
_user = null;
|
||||
_isAuthenticated = false;
|
||||
|
||||
// By default pop ups are disabled because they don't work properly on Edge.
|
||||
// If you want to enable pop up authentication simply set this flag to false.
|
||||
_popUpDisabled = true;
|
||||
|
||||
async isAuthenticated() {
|
||||
const user = await this.getUser();
|
||||
return !!user;
|
||||
|
@ -47,6 +51,10 @@ export class AuthorizeService {
|
|||
console.log("Silent authentication error: ", silentError);
|
||||
|
||||
try {
|
||||
if (this._popUpDisabled) {
|
||||
throw new Error('Popup disabled. Change \'AuthorizeService.js:AuthorizeService._popupDisabled\' to false to enable it.')
|
||||
}
|
||||
|
||||
const popUpUser = await this.userManager.signinPopup(this.createArguments(LoginMode.PopUp));
|
||||
this.updateState(popUpUser);
|
||||
return this.success(state);
|
||||
|
@ -54,8 +62,9 @@ export class AuthorizeService {
|
|||
if (popUpError.message === "Popup window closed") {
|
||||
// The user explicitly cancelled the login action by closing an opened popup.
|
||||
return this.error("The user closed the window.");
|
||||
} else if (!this._popUpDisabled) {
|
||||
console.log("Popup authentication error: ", popUpError);
|
||||
}
|
||||
console.log("Popup authentication error: ", popUpError);
|
||||
|
||||
// PopUps might be blocked by the user, fallback to redirect
|
||||
try {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// <auto-generated />
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Company.WebApplication1.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -17,14 +17,13 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview.19080.1")
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
|
@ -75,7 +74,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||
{
|
||||
b.Property<string>("UserCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(200);
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
|
@ -103,9 +101,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
b.HasIndex("DeviceCode")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceCodes");
|
||||
});
|
||||
|
||||
|
@ -142,8 +137,7 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
@ -256,47 +250,53 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
|
@ -232,12 +232,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
column: "DeviceCode",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DeviceCodes_UserCode",
|
||||
table: "DeviceCodes",
|
||||
column: "UserCode",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PersistedGrants_SubjectId_ClientId_Type",
|
||||
table: "PersistedGrants",
|
||||
|
|
|
@ -15,14 +15,13 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview.19080.1")
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
|
@ -73,7 +72,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||
{
|
||||
b.Property<string>("UserCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(200);
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
|
@ -101,9 +99,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
b.HasIndex("DeviceCode")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceCodes");
|
||||
});
|
||||
|
||||
|
@ -140,8 +135,7 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
@ -254,47 +248,53 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// <auto-generated />
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Company.WebApplication1.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -16,12 +16,11 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview.19080.1");
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3");
|
||||
|
||||
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
|
@ -71,7 +70,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||
{
|
||||
b.Property<string>("UserCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(200);
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
|
@ -99,9 +97,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
b.HasIndex("DeviceCode")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceCodes");
|
||||
});
|
||||
|
||||
|
@ -138,8 +133,7 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
@ -249,47 +243,53 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
|
|
@ -229,12 +229,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
column: "DeviceCode",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_DeviceCodes_UserCode",
|
||||
table: "DeviceCodes",
|
||||
column: "UserCode",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PersistedGrants_SubjectId_ClientId_Type",
|
||||
table: "PersistedGrants",
|
||||
|
|
|
@ -14,12 +14,11 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview.19080.1");
|
||||
.HasAnnotation("ProductVersion", "3.0.0-preview4.19174.3");
|
||||
|
||||
modelBuilder.Entity("Company.WebApplication1.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
|
@ -69,7 +68,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
|
||||
{
|
||||
b.Property<string>("UserCode")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(200);
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
|
@ -97,9 +95,6 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
b.HasIndex("DeviceCode")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("UserCode")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DeviceCodes");
|
||||
});
|
||||
|
||||
|
@ -136,8 +131,7 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
@ -247,47 +241,53 @@ namespace Company.WebApplication1.Data.Migrations
|
|||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
|
||||
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
||||
{
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser")
|
||||
b.HasOne("Company.WebApplication1.Models.ApplicationUser", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче