diff --git a/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs b/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs index 9807335..9021339 100644 --- a/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs +++ b/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs @@ -1,6 +1,6 @@ -using api.fergl.ie.Components.Account.Pages; -using api.fergl.ie.Components.Account.Pages.Manage; -using api.fergl.ie.Data; +using Ferglie.Api.Components.Account.Pages; +using Ferglie.Api.Components.Account.Pages.Manage; +using Ferglie.Api.Data; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Http.Extensions; diff --git a/Components/Account/IdentityNoOpEmailSender.cs b/Components/Account/IdentityNoOpEmailSender.cs index 4b58552..c545971 100644 --- a/Components/Account/IdentityNoOpEmailSender.cs +++ b/Components/Account/IdentityNoOpEmailSender.cs @@ -1,8 +1,8 @@ -using api.fergl.ie.Data; +using Ferglie.Api.Data; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity.UI.Services; -namespace api.fergl.ie.Components.Account +namespace Ferglie.Api.Components.Account { // Remove the "else if (EmailSender is IdentityNoOpEmailSender)" block from RegisterConfirmation.razor after updating with a real implementation. internal sealed class IdentityNoOpEmailSender : IEmailSender diff --git a/Components/Account/IdentityRedirectManager.cs b/Components/Account/IdentityRedirectManager.cs index 7547269..e6eac8e 100644 --- a/Components/Account/IdentityRedirectManager.cs +++ b/Components/Account/IdentityRedirectManager.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Components; using System.Diagnostics.CodeAnalysis; -namespace api.fergl.ie.Components.Account +namespace Ferglie.Api.Components.Account { internal sealed class IdentityRedirectManager(NavigationManager navigationManager) { diff --git a/Components/Account/IdentityRevalidatingAuthenticationStateProvider.cs b/Components/Account/IdentityRevalidatingAuthenticationStateProvider.cs index 3f0f624..86769a4 100644 --- a/Components/Account/IdentityRevalidatingAuthenticationStateProvider.cs +++ b/Components/Account/IdentityRevalidatingAuthenticationStateProvider.cs @@ -1,11 +1,11 @@ -using api.fergl.ie.Data; +using Ferglie.Api.Data; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Server; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; using System.Security.Claims; -namespace api.fergl.ie.Components.Account +namespace Ferglie.Api.Components.Account { // This is a server-side AuthenticationStateProvider that revalidates the security stamp for the connected user // every 30 minutes an interactive circuit is connected. diff --git a/Components/Account/IdentityUserAccessor.cs b/Components/Account/IdentityUserAccessor.cs index 0a1e62c..b70ab75 100644 --- a/Components/Account/IdentityUserAccessor.cs +++ b/Components/Account/IdentityUserAccessor.cs @@ -1,7 +1,7 @@ -using api.fergl.ie.Data; +using Ferglie.Api.Data; using Microsoft.AspNetCore.Identity; -namespace api.fergl.ie.Components.Account +namespace Ferglie.Api.Components.Account { internal sealed class IdentityUserAccessor(UserManager userManager, IdentityRedirectManager redirectManager) { diff --git a/Components/Account/Pages/ConfirmEmail.razor b/Components/Account/Pages/ConfirmEmail.razor index 7b32926..e47d8b1 100644 --- a/Components/Account/Pages/ConfirmEmail.razor +++ b/Components/Account/Pages/ConfirmEmail.razor @@ -3,7 +3,7 @@ @using System.Text @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IdentityRedirectManager RedirectManager diff --git a/Components/Account/Pages/ConfirmEmailChange.razor b/Components/Account/Pages/ConfirmEmailChange.razor index 6253e77..7208442 100644 --- a/Components/Account/Pages/ConfirmEmailChange.razor +++ b/Components/Account/Pages/ConfirmEmailChange.razor @@ -3,7 +3,7 @@ @using System.Text @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/Components/Account/Pages/ExternalLogin.razor b/Components/Account/Pages/ExternalLogin.razor index 46313b1..7136b9a 100644 --- a/Components/Account/Pages/ExternalLogin.razor +++ b/Components/Account/Pages/ExternalLogin.razor @@ -6,7 +6,7 @@ @using System.Text.Encodings.Web @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject SignInManager SignInManager @inject UserManager UserManager diff --git a/Components/Account/Pages/ForgotPassword.razor b/Components/Account/Pages/ForgotPassword.razor index 108f120..20cb8b4 100644 --- a/Components/Account/Pages/ForgotPassword.razor +++ b/Components/Account/Pages/ForgotPassword.razor @@ -5,7 +5,7 @@ @using System.Text.Encodings.Web @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IEmailSender EmailSender diff --git a/Components/Account/Pages/Login.razor b/Components/Account/Pages/Login.razor index 063d0da..6cc18ab 100644 --- a/Components/Account/Pages/Login.razor +++ b/Components/Account/Pages/Login.razor @@ -3,7 +3,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Authentication @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject SignInManager SignInManager @inject ILogger Logger diff --git a/Components/Account/Pages/LoginWith2fa.razor b/Components/Account/Pages/LoginWith2fa.razor index 0892b37..3fd4e9b 100644 --- a/Components/Account/Pages/LoginWith2fa.razor +++ b/Components/Account/Pages/LoginWith2fa.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject SignInManager SignInManager @inject UserManager UserManager diff --git a/Components/Account/Pages/LoginWithRecoveryCode.razor b/Components/Account/Pages/LoginWithRecoveryCode.razor index f9259ed..3927eb2 100644 --- a/Components/Account/Pages/LoginWithRecoveryCode.razor +++ b/Components/Account/Pages/LoginWithRecoveryCode.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject SignInManager SignInManager @inject UserManager UserManager diff --git a/Components/Account/Pages/Manage/ChangePassword.razor b/Components/Account/Pages/Manage/ChangePassword.razor index cbd96e5..8af3cf7 100644 --- a/Components/Account/Pages/Manage/ChangePassword.razor +++ b/Components/Account/Pages/Manage/ChangePassword.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/Components/Account/Pages/Manage/DeletePersonalData.razor b/Components/Account/Pages/Manage/DeletePersonalData.razor index 20016cd..75afc3e 100644 --- a/Components/Account/Pages/Manage/DeletePersonalData.razor +++ b/Components/Account/Pages/Manage/DeletePersonalData.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/Components/Account/Pages/Manage/Disable2fa.razor b/Components/Account/Pages/Manage/Disable2fa.razor index ed4e754..996033a 100644 --- a/Components/Account/Pages/Manage/Disable2fa.razor +++ b/Components/Account/Pages/Manage/Disable2fa.razor @@ -1,7 +1,7 @@ @page "/Account/Manage/Disable2fa" @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IdentityUserAccessor UserAccessor diff --git a/Components/Account/Pages/Manage/Email.razor b/Components/Account/Pages/Manage/Email.razor index 0d5631c..13488f8 100644 --- a/Components/Account/Pages/Manage/Email.razor +++ b/Components/Account/Pages/Manage/Email.razor @@ -5,7 +5,7 @@ @using System.Text.Encodings.Web @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IEmailSender EmailSender diff --git a/Components/Account/Pages/Manage/EnableAuthenticator.razor b/Components/Account/Pages/Manage/EnableAuthenticator.razor index 5c88c82..fcfdeeb 100644 --- a/Components/Account/Pages/Manage/EnableAuthenticator.razor +++ b/Components/Account/Pages/Manage/EnableAuthenticator.razor @@ -5,7 +5,7 @@ @using System.Text @using System.Text.Encodings.Web @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IdentityUserAccessor UserAccessor diff --git a/Components/Account/Pages/Manage/ExternalLogins.razor b/Components/Account/Pages/Manage/ExternalLogins.razor index 401ba99..b4c810c 100644 --- a/Components/Account/Pages/Manage/ExternalLogins.razor +++ b/Components/Account/Pages/Manage/ExternalLogins.razor @@ -2,7 +2,7 @@ @using Microsoft.AspNetCore.Authentication @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/Components/Account/Pages/Manage/GenerateRecoveryCodes.razor b/Components/Account/Pages/Manage/GenerateRecoveryCodes.razor index ddf4526..84b4c8c 100644 --- a/Components/Account/Pages/Manage/GenerateRecoveryCodes.razor +++ b/Components/Account/Pages/Manage/GenerateRecoveryCodes.razor @@ -1,7 +1,7 @@ @page "/Account/Manage/GenerateRecoveryCodes" @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IdentityUserAccessor UserAccessor diff --git a/Components/Account/Pages/Manage/Index.razor b/Components/Account/Pages/Manage/Index.razor index 61323f8..d48c2af 100644 --- a/Components/Account/Pages/Manage/Index.razor +++ b/Components/Account/Pages/Manage/Index.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/Components/Account/Pages/Manage/ResetAuthenticator.razor b/Components/Account/Pages/Manage/ResetAuthenticator.razor index 62e6cda..6e934a1 100644 --- a/Components/Account/Pages/Manage/ResetAuthenticator.razor +++ b/Components/Account/Pages/Manage/ResetAuthenticator.razor @@ -1,7 +1,7 @@ @page "/Account/Manage/ResetAuthenticator" @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/Components/Account/Pages/Manage/SetPassword.razor b/Components/Account/Pages/Manage/SetPassword.razor index e09d129..e302c1e 100644 --- a/Components/Account/Pages/Manage/SetPassword.razor +++ b/Components/Account/Pages/Manage/SetPassword.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/Components/Account/Pages/Manage/TwoFactorAuthentication.razor b/Components/Account/Pages/Manage/TwoFactorAuthentication.razor index d947a14..52cb680 100644 --- a/Components/Account/Pages/Manage/TwoFactorAuthentication.razor +++ b/Components/Account/Pages/Manage/TwoFactorAuthentication.razor @@ -2,7 +2,7 @@ @using Microsoft.AspNetCore.Http.Features @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/Components/Account/Pages/Register.razor b/Components/Account/Pages/Register.razor index 83fed35..1391647 100644 --- a/Components/Account/Pages/Register.razor +++ b/Components/Account/Pages/Register.razor @@ -5,7 +5,7 @@ @using System.Text.Encodings.Web @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IUserStore UserStore diff --git a/Components/Account/Pages/RegisterConfirmation.razor b/Components/Account/Pages/RegisterConfirmation.razor index 925a0d5..4eb4f1f 100644 --- a/Components/Account/Pages/RegisterConfirmation.razor +++ b/Components/Account/Pages/RegisterConfirmation.razor @@ -3,7 +3,7 @@ @using System.Text @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IEmailSender EmailSender diff --git a/Components/Account/Pages/ResendEmailConfirmation.razor b/Components/Account/Pages/ResendEmailConfirmation.razor index 50d3d37..7a60c34 100644 --- a/Components/Account/Pages/ResendEmailConfirmation.razor +++ b/Components/Account/Pages/ResendEmailConfirmation.razor @@ -5,7 +5,7 @@ @using System.Text.Encodings.Web @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject UserManager UserManager @inject IEmailSender EmailSender diff --git a/Components/Account/Pages/ResetPassword.razor b/Components/Account/Pages/ResetPassword.razor index 330b360..e37a4f5 100644 --- a/Components/Account/Pages/ResetPassword.razor +++ b/Components/Account/Pages/ResetPassword.razor @@ -4,7 +4,7 @@ @using System.Text @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject IdentityRedirectManager RedirectManager @inject UserManager UserManager diff --git a/Components/Account/Pages/_Imports.razor b/Components/Account/Pages/_Imports.razor index 4c3d92f..ccd6612 100644 --- a/Components/Account/Pages/_Imports.razor +++ b/Components/Account/Pages/_Imports.razor @@ -1,2 +1,2 @@ -@using api.fergl.ie.Components.Account.Shared +@using Ferglie.Api.Components.Account.Shared @layout AccountLayout diff --git a/Components/Account/Shared/AccountLayout.razor b/Components/Account/Shared/AccountLayout.razor index 67793c0..ea62534 100644 --- a/Components/Account/Shared/AccountLayout.razor +++ b/Components/Account/Shared/AccountLayout.razor @@ -1,5 +1,5 @@ @inherits LayoutComponentBase -@layout api.fergl.ie.Components.Layout.MainLayout +@layout Ferglie.Api.Components.Layout.MainLayout @inject NavigationManager NavigationManager @if (HttpContext is null) diff --git a/Components/Account/Shared/ExternalLoginPicker.razor b/Components/Account/Shared/ExternalLoginPicker.razor index 6a5c7b3..713957d 100644 --- a/Components/Account/Shared/ExternalLoginPicker.razor +++ b/Components/Account/Shared/ExternalLoginPicker.razor @@ -1,6 +1,6 @@ @using Microsoft.AspNetCore.Authentication @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject SignInManager SignInManager @inject IdentityRedirectManager RedirectManager diff --git a/Components/Account/Shared/ManageNavMenu.razor b/Components/Account/Shared/ManageNavMenu.razor index 0624250..7f3c36b 100644 --- a/Components/Account/Shared/ManageNavMenu.razor +++ b/Components/Account/Shared/ManageNavMenu.razor @@ -1,5 +1,5 @@ @using Microsoft.AspNetCore.Identity -@using api.fergl.ie.Data +@using Ferglie.Api.Data @inject SignInManager SignInManager diff --git a/Components/Routes.razor b/Components/Routes.razor index 3dadf00..d7b4b48 100644 --- a/Components/Routes.razor +++ b/Components/Routes.razor @@ -1,4 +1,4 @@ -@using api.fergl.ie.Components.Account.Shared +@using Ferglie.Api.Components.Account.Shared diff --git a/Components/_Imports.razor b/Components/_Imports.razor index ecb2c2d..c7973d0 100644 --- a/Components/_Imports.razor +++ b/Components/_Imports.razor @@ -7,5 +7,5 @@ @using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop -@using api.fergl.ie -@using api.fergl.ie.Components +@using Ferglie.Api +@using Ferglie.Api.Components diff --git a/Data/ApplicationDbContext.cs b/Data/ApplicationDbContext.cs index b2533b3..0751efc 100644 --- a/Data/ApplicationDbContext.cs +++ b/Data/ApplicationDbContext.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -namespace api.fergl.ie.Data +namespace Ferglie.Api.Data { public class ApplicationDbContext(DbContextOptions options) : IdentityDbContext(options) { diff --git a/Data/ApplicationUser.cs b/Data/ApplicationUser.cs index 3054176..6d591c2 100644 --- a/Data/ApplicationUser.cs +++ b/Data/ApplicationUser.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Identity; -namespace api.fergl.ie.Data +namespace Ferglie.Api.Data { // Add profile data for application users by adding properties to the ApplicationUser class public class ApplicationUser : IdentityUser diff --git a/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs b/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs deleted file mode 100644 index 8935457..0000000 --- a/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs +++ /dev/null @@ -1,279 +0,0 @@ -// -using api.fergl.ie.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using System; - -#nullable disable - -namespace api.fergl.ie.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("00000000000000_CreateIdentitySchema")] - partial class CreateIdentitySchema - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("api.fergl.ie.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("api.fergl.ie.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("api.fergl.ie.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("api.fergl.ie.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("api.fergl.ie.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Data/Migrations/00000000000000_CreateIdentitySchema.cs b/Data/Migrations/00000000000000_CreateIdentitySchema.cs deleted file mode 100644 index 571ad4d..0000000 --- a/Data/Migrations/00000000000000_CreateIdentitySchema.cs +++ /dev/null @@ -1,224 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using System; - -#nullable disable - -namespace api.fergl.ie.Migrations -{ - /// - public partial class CreateIdentitySchema : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AspNetRoles", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetUsers", - columns: table => new - { - Id = table.Column(type: "nvarchar(450)", nullable: false), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), - SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetRoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "nvarchar(450)", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "nvarchar(450)", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetUserClaims_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), - UserId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_AspNetUserLogins_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserRoles", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - RoleId = table.Column(type: "nvarchar(450)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column(type: "nvarchar(450)", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AspNetUserTokens_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AspNetRoleClaims_RoleId", - table: "AspNetRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserClaims_UserId", - table: "AspNetUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserLogins_UserId", - table: "AspNetUserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_RoleId", - table: "AspNetUserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "AspNetUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "AspNetUsers", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AspNetRoleClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserLogins"); - - migrationBuilder.DropTable( - name: "AspNetUserRoles"); - - migrationBuilder.DropTable( - name: "AspNetUserTokens"); - - migrationBuilder.DropTable( - name: "AspNetRoles"); - - migrationBuilder.DropTable( - name: "AspNetUsers"); - } - } -} diff --git a/Data/Migrations/ApplicationDbContextModelSnapshot.cs b/Data/Migrations/ApplicationDbContextModelSnapshot.cs deleted file mode 100644 index 8fabdcd..0000000 --- a/Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ /dev/null @@ -1,276 +0,0 @@ -// -using api.fergl.ie.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using System; - -#nullable disable - -namespace api.fergl.ie.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - partial class ApplicationDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("api.fergl.ie.Data.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("api.fergl.ie.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("api.fergl.ie.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("api.fergl.ie.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("api.fergl.ie.Data.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Program.cs b/Program.cs index 62e78ef..847d6f8 100644 --- a/Program.cs +++ b/Program.cs @@ -1,6 +1,6 @@ -using api.fergl.ie.Components; -using api.fergl.ie.Components.Account; -using api.fergl.ie.Data; +using Ferglie.Api.Components; +using Ferglie.Api.Components.Account; +using Ferglie.Api.Data; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; diff --git a/api.fergl.ie.csproj b/api.fergl.ie.csproj index d4922f4..f3b816b 100644 --- a/api.fergl.ie.csproj +++ b/api.fergl.ie.csproj @@ -6,6 +6,7 @@ enable aspnet-api.fergl.ie-b899f8de-d911-4922-9247-97db7392e48b x64 + Ferglie.Api