├── src ├── Frontend_Identity │ ├── README.md │ ├── src │ │ ├── assets │ │ │ ├── css │ │ │ │ └── style.css │ │ │ ├── images │ │ │ │ ├── favicon.ico │ │ │ │ ├── logo │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── logo-icon.svg │ │ │ │ │ └── logo.svg │ │ │ │ └── user │ │ │ │ │ └── user.png │ │ │ └── svg │ │ │ │ ├── delete.svg │ │ │ │ ├── edit.svg │ │ │ │ ├── reset_password.svg │ │ │ │ └── save.svg │ │ ├── helpers │ │ │ ├── emitter.ts │ │ │ └── ViteEnv.ts │ │ ├── views │ │ │ └── HomeView.vue │ │ ├── types │ │ │ └── env.d.ts │ │ ├── main.ts │ │ └── router │ │ │ └── index.ts │ ├── env.d.ts │ ├── .env.production │ ├── .env.development │ ├── public │ │ ├── favicon.ico │ │ └── login.html │ ├── postcss.config.js │ ├── .vscode │ │ └── extensions.json │ ├── .prettierrc.json │ ├── tsconfig.app.json │ ├── buildExt.js │ ├── .eslintrc.cjs │ ├── tsconfig.node.json │ ├── .gitignore │ ├── index.html │ ├── vite.config.ts │ ├── tailwind.config.js │ └── tsconfig.json └── MiniAuth.IdentityAuth │ ├── icon.png │ ├── minisoftware.snk │ ├── wwwroot │ ├── favicon.ico │ ├── assets │ │ ├── favicon-nEFMWCT0.ico │ │ ├── UsersView-Hpoy62lu.css │ │ └── EndpointsView-M0wP4A-_.js │ ├── index.html │ └── login.html │ ├── Models │ ├── RefreshRequest.cs │ ├── LoginRequest.cs │ ├── ResponseVo.cs │ └── RoleEndpointEntity.cs │ ├── MiniAuthIdentityDbContext.cs │ ├── Helpers │ └── JsonHelper.cs │ └── MiniAuthStartupFilter.cs ├── README.es.md ├── README.jp.md ├── README.zh-Hant.md ├── tests ├── TestMVC5 │ └── TestMVC5 │ │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ ├── Privacy.cshtml │ │ │ └── Index.cshtml │ │ └── Shared │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ ├── Error.cshtml │ │ │ └── _LoginPartial.cshtml │ │ ├── Areas │ │ └── Identity │ │ │ └── Pages │ │ │ └── _ViewStart.cshtml │ │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── js │ │ │ └── site.js │ │ └── lib │ │ │ ├── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ │ ├── jquery-validation │ │ │ └── LICENSE.md │ │ │ └── bootstrap │ │ │ └── LICENSE │ │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.local.json │ │ └── launchSettings.json │ │ ├── appsettings.Development.json │ │ ├── Models │ │ └── ErrorViewModel.cs │ │ ├── appsettings.json │ │ ├── Data │ │ └── ApplicationDbContext.cs │ │ ├── Program.cs │ │ ├── TestMVC5.csproj │ │ └── Controllers │ │ └── HomeController.cs ├── TestMVCCore3 │ └── TestMVCCore3 │ │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ ├── Privacy.cshtml │ │ │ └── Index.cshtml │ │ └── Shared │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ ├── Error.cshtml │ │ │ └── _LoginPartial.cshtml │ │ ├── Areas │ │ └── Identity │ │ │ └── Pages │ │ │ └── _ViewStart.cshtml │ │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── js │ │ │ └── site.js │ │ └── lib │ │ │ ├── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ │ ├── jquery-validation │ │ │ └── LICENSE.md │ │ │ └── bootstrap │ │ │ └── LICENSE │ │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.local.json │ │ └── launchSettings.json │ │ ├── appsettings.Development.json │ │ ├── Models │ │ └── ErrorViewModel.cs │ │ ├── appsettings.json │ │ ├── Data │ │ └── ApplicationDbContext.cs │ │ ├── Program.cs │ │ ├── TestMVCCore3.csproj │ │ └── Controllers │ │ └── HomeController.cs ├── AspNetCoreIdentity │ ├── AspNetCoreIdentity │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ ├── Home │ │ │ │ ├── Privacy.cshtml │ │ │ │ └── Index.cshtml │ │ │ └── Shared │ │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ │ ├── Error.cshtml │ │ │ │ ├── _LoginPartial.cshtml │ │ │ │ └── _Layout.cshtml.css │ │ ├── Areas │ │ │ └── Identity │ │ │ │ └── Pages │ │ │ │ ├── Account │ │ │ │ ├── _ViewImports.cshtml │ │ │ │ ├── Manage │ │ │ │ │ ├── _ViewImports.cshtml │ │ │ │ │ ├── DownloadPersonalData.cshtml │ │ │ │ │ ├── _StatusMessage.cshtml │ │ │ │ │ ├── _Layout.cshtml │ │ │ │ │ ├── Disable2fa.cshtml │ │ │ │ │ ├── ShowRecoveryCodes.cshtml │ │ │ │ │ ├── PersonalData.cshtml │ │ │ │ │ ├── ResetAuthenticator.cshtml │ │ │ │ │ ├── GenerateRecoveryCodes.cshtml │ │ │ │ │ ├── _ManageNav.cshtml │ │ │ │ │ ├── PersonalData.cshtml.cs │ │ │ │ │ ├── DeletePersonalData.cshtml │ │ │ │ │ └── Index.cshtml │ │ │ │ ├── ConfirmEmail.cshtml │ │ │ │ ├── ConfirmEmailChange.cshtml │ │ │ │ ├── ForgotPasswordConfirmation.cshtml │ │ │ │ ├── AccessDenied.cshtml │ │ │ │ ├── Lockout.cshtml │ │ │ │ ├── ResetPasswordConfirmation.cshtml │ │ │ │ ├── _StatusMessage.cshtml │ │ │ │ ├── Logout.cshtml │ │ │ │ ├── RegisterConfirmation.cshtml │ │ │ │ ├── AccessDenied.cshtml.cs │ │ │ │ ├── ResendEmailConfirmation.cshtml │ │ │ │ ├── ForgotPassword.cshtml │ │ │ │ ├── Lockout.cshtml.cs │ │ │ │ ├── ForgotPasswordConfirmation.cshtml.cs │ │ │ │ ├── ResetPasswordConfirmation.cshtml.cs │ │ │ │ └── LoginWithRecoveryCode.cshtml │ │ │ │ ├── _ViewStart.cshtml │ │ │ │ ├── _ViewImports.cshtml │ │ │ │ ├── Error.cshtml │ │ │ │ └── _ValidationScriptsPartial.cshtml │ │ ├── wwwroot │ │ │ ├── favicon.ico │ │ │ ├── js │ │ │ │ └── site.js │ │ │ ├── css │ │ │ │ └── site.css │ │ │ └── lib │ │ │ │ ├── jquery │ │ │ │ └── LICENSE.txt │ │ │ │ ├── jquery-validation │ │ │ │ └── LICENSE.md │ │ │ │ ├── bootstrap │ │ │ │ └── LICENSE │ │ │ │ └── jquery-validation-unobtrusive │ │ │ │ └── LICENSE.txt │ │ ├── appsettings.Development.json │ │ ├── Properties │ │ │ ├── serviceDependencies.json │ │ │ ├── serviceDependencies.local.json │ │ │ └── launchSettings.json │ │ ├── Models │ │ │ └── ErrorViewModel.cs │ │ ├── Data │ │ │ └── ApplicationDbContext.cs │ │ ├── appsettings.json │ │ ├── Controllers │ │ │ └── HomeController.cs │ │ └── AspNetCoreIdentity.csproj │ └── AspNetCoreIdentity.sln ├── TestMVCWithCookieIdentity │ └── TestMVCWithCookieIdentity │ │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ ├── Privacy.cshtml │ │ │ └── Index.cshtml │ │ └── Shared │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ ├── Error.cshtml │ │ │ ├── _LoginPartial.cshtml │ │ │ └── _Layout.cshtml.css │ │ ├── Areas │ │ └── Identity │ │ │ └── Pages │ │ │ ├── _ViewStart.cshtml │ │ │ ├── Account │ │ │ ├── _ViewImports.cshtml │ │ │ ├── Manage │ │ │ │ ├── _ViewImports.cshtml │ │ │ │ ├── DownloadPersonalData.cshtml │ │ │ │ ├── _StatusMessage.cshtml │ │ │ │ ├── _Layout.cshtml │ │ │ │ ├── Disable2fa.cshtml │ │ │ │ ├── ShowRecoveryCodes.cshtml │ │ │ │ ├── PersonalData.cshtml │ │ │ │ ├── ResetAuthenticator.cshtml │ │ │ │ ├── GenerateRecoveryCodes.cshtml │ │ │ │ ├── _ManageNav.cshtml │ │ │ │ ├── PersonalData.cshtml.cs │ │ │ │ ├── DeletePersonalData.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── ConfirmEmail.cshtml │ │ │ ├── ConfirmEmailChange.cshtml │ │ │ ├── ForgotPasswordConfirmation.cshtml │ │ │ ├── AccessDenied.cshtml │ │ │ ├── Lockout.cshtml │ │ │ ├── ResetPasswordConfirmation.cshtml │ │ │ ├── _StatusMessage.cshtml │ │ │ ├── Logout.cshtml │ │ │ ├── RegisterConfirmation.cshtml │ │ │ ├── AccessDenied.cshtml.cs │ │ │ ├── ResendEmailConfirmation.cshtml │ │ │ ├── ForgotPassword.cshtml │ │ │ ├── Lockout.cshtml.cs │ │ │ ├── ForgotPasswordConfirmation.cshtml.cs │ │ │ ├── ResetPasswordConfirmation.cshtml.cs │ │ │ └── LoginWithRecoveryCode.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ ├── Error.cshtml │ │ │ └── _ValidationScriptsPartial.cshtml │ │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── js │ │ │ └── site.js │ │ ├── css │ │ │ └── site.css │ │ └── lib │ │ │ ├── jquery │ │ │ └── LICENSE.txt │ │ │ ├── jquery-validation │ │ │ └── LICENSE.md │ │ │ ├── bootstrap │ │ │ └── LICENSE │ │ │ └── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ ├── appsettings.Development.json │ │ ├── Properties │ │ ├── serviceDependencies.json │ │ ├── serviceDependencies.local.json │ │ └── launchSettings.json │ │ ├── Models │ │ └── ErrorViewModel.cs │ │ ├── Data │ │ └── ApplicationDbContext.cs │ │ └── appsettings.json ├── BlazorApp │ └── BlazorApp │ │ ├── BlazorApp │ │ ├── Components │ │ │ ├── Account │ │ │ │ ├── Pages │ │ │ │ │ ├── _Imports.razor │ │ │ │ │ ├── Manage │ │ │ │ │ │ ├── _Imports.razor │ │ │ │ │ │ └── PersonalData.razor │ │ │ │ │ ├── InvalidUser.razor │ │ │ │ │ ├── InvalidPasswordReset.razor │ │ │ │ │ ├── ForgotPasswordConfirmation.razor │ │ │ │ │ ├── Lockout.razor │ │ │ │ │ └── ResetPasswordConfirmation.razor │ │ │ │ ├── Shared │ │ │ │ │ ├── ManageLayout.razor │ │ │ │ │ ├── ShowRecoveryCodes.razor │ │ │ │ │ ├── AccountLayout.razor │ │ │ │ │ ├── StatusMessage.razor │ │ │ │ │ └── ManageNavMenu.razor │ │ │ │ ├── IdentityUserAccessor.cs │ │ │ │ └── IdentityNoOpEmailSender.cs │ │ │ ├── Pages │ │ │ │ ├── Home.razor │ │ │ │ └── Error.razor │ │ │ ├── Routes.razor │ │ │ ├── _Imports.razor │ │ │ ├── App.razor │ │ │ └── Layout │ │ │ │ └── MainLayout.razor │ │ ├── wwwroot │ │ │ └── favicon.png │ │ ├── appsettings.Development.json │ │ ├── Properties │ │ │ ├── serviceDependencies.json │ │ │ ├── serviceDependencies.local.json │ │ │ └── launchSettings.json │ │ ├── Data │ │ │ ├── ApplicationUser.cs │ │ │ └── ApplicationDbContext.cs │ │ ├── appsettings.json │ │ └── BlazorApp.csproj │ │ └── BlazorApp.Client │ │ ├── wwwroot │ │ ├── appsettings.json │ │ └── appsettings.Development.json │ │ ├── RedirectToLogin.razor │ │ ├── Pages │ │ ├── Auth.razor │ │ └── Counter.razor │ │ ├── UserInfo.cs │ │ ├── _Imports.razor │ │ ├── Program.cs │ │ └── BlazorApp.Client.csproj ├── TestJWTApi │ ├── TestJWTApi │ │ ├── TestJWTApi.http │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── WeatherForecast.cs │ │ ├── TestJWTApi.csproj │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ └── Properties │ │ │ └── launchSettings.json │ └── TestJWTApi.sln ├── MiniAuth.Identity │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── MiniAuth.IdentityWeb.csproj │ ├── Properties │ │ └── launchSettings.json │ └── MiniAuth.Identity.sln ├── TestCookieApi │ └── TestCookieApi │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── .config │ │ └── dotnet-tools.json │ │ ├── TestCookieApi.csproj │ │ ├── Program.cs │ │ └── Properties │ │ └── launchSettings.json ├── TestCustomOptions │ └── TestCustomOptions │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── TestCustomOptions.csproj │ │ └── Properties │ │ └── launchSettings.json ├── TestReleaseDefault │ └── TestReleaseDefault │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── TestReleaseDefault.csproj │ │ ├── Program.cs │ │ └── Properties │ │ └── launchSettings.json ├── IdentityAPIEndpoints │ └── IdentityAPIEndpoints │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── Properties │ │ └── launchSettings.json │ │ └── IdentityAPIEndpoints.csproj ├── TestAspNetCoreApiAot │ ├── TestAspNetCoreApiAot │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── TestAspNetCoreApiAot.http │ │ ├── Properties │ │ │ └── launchSettings.json │ │ └── TestAspNetCoreApiAot.csproj │ └── TestAspNetCoreApiAot.sln ├── TestAspNetCoreEmpty │ └── TestAspNetCoreEmpty │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── TestAspNetCoreEmpty.csproj │ │ ├── Program.cs │ │ └── Properties │ │ └── launchSettings.json ├── TestApiWithoutIdentity │ └── TestApiWithoutIdentity │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── .config │ │ └── dotnet-tools.json │ │ ├── WeatherForecast.cs │ │ ├── TestApiWithoutIdentity.csproj │ │ ├── Program.cs │ │ └── Properties │ │ └── launchSettings.json ├── TestBearer │ └── TestBearer │ │ ├── appsettings.json │ │ ├── appsettings.Development.json │ │ ├── TestBearer.csproj │ │ ├── Properties │ │ └── launchSettings.json │ │ └── Program.cs └── MiniAuth.Tests.AspNetCore │ ├── Properties │ └── launchSettings.json │ └── MiniAuth.Tests.AspNetCore.csproj ├── Build.csproj ├── DevNote.md └── .github ├── workflows └── main.yml └── FUNDING.yml /src/Frontend_Identity/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.es.md: -------------------------------------------------------------------------------- 1 | Waiting contributions 🙌 -------------------------------------------------------------------------------- /README.jp.md: -------------------------------------------------------------------------------- 1 | Waiting contributions 🙌 -------------------------------------------------------------------------------- /README.zh-Hant.md: -------------------------------------------------------------------------------- 1 | Waiting contributions 🙌 -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/css/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Frontend_Identity/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Frontend_Identity/.env.production: -------------------------------------------------------------------------------- 1 | ENV = 'production' 2 | VITE_DEBUG=false 3 | VITE_APP_BASE_API = "/MiniAuth/" -------------------------------------------------------------------------------- /src/Frontend_Identity/src/helpers/emitter.ts: -------------------------------------------------------------------------------- 1 | import mitt from 'mitt' 2 | 3 | export const emitter = mitt() 4 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/MiniAuth.IdentityAuth/icon.png -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Frontend_Identity/.env.development: -------------------------------------------------------------------------------- 1 | ENV = 'development' 2 | VITE_DEBUG=true 3 | VITE_APP_BASE_API = "http://localhost:5566/MiniAuth/" -------------------------------------------------------------------------------- /src/Frontend_Identity/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/Frontend_Identity/public/favicon.ico -------------------------------------------------------------------------------- /src/Frontend_Identity/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/minisoftware.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/MiniAuth.IdentityAuth/minisoftware.snk -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/MiniAuth.IdentityAuth/wwwroot/favicon.ico -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetCoreIdentity.Areas.Identity.Pages.Account -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Pages/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using BlazorApp.Components.Account.Shared 2 | @layout AccountLayout 3 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/tests/TestMVC5/TestMVC5/wwwroot/favicon.ico -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TestMVC5 2 | @using TestMVC5.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/Frontend_Identity/src/assets/images/favicon.ico -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetCoreIdentity.Areas.Identity.Pages.Account.Manage -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/tests/TestMVCCore3/TestMVCCore3/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/images/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/Frontend_Identity/src/assets/images/logo/logo.png -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/images/user/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/Frontend_Identity/src/assets/images/user/user.png -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/wwwroot/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/tests/BlazorApp/BlazorApp/BlazorApp/wwwroot/favicon.png -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TestMVCWithCookieIdentity.Areas.Identity.Pages.Account -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Pages/Manage/_Imports.razor: -------------------------------------------------------------------------------- 1 | @layout ManageLayout 2 | @attribute [Microsoft.AspNetCore.Authorization.Authorize] 3 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TestMVCCore3 2 | @using TestMVCCore3.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/images/logo/logo-icon.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/Frontend_Identity/src/assets/images/logo/logo-icon.svg -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/wwwroot/assets/favicon-nEFMWCT0.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/src/MiniAuth.IdentityAuth/wwwroot/assets/favicon-nEFMWCT0.ico -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Pages/Home.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 | Home 4 | 5 |

Hello, world!

6 | 7 | Welcome to your new app. 8 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TestMVCWithCookieIdentity.Areas.Identity.Pages.Account.Manage -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/tests/AspNetCoreIdentity/AspNetCoreIdentity/wwwroot/favicon.ico -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetCoreIdentity 2 | @using AspNetCoreIdentity.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /tests/TestJWTApi/TestJWTApi/TestJWTApi.http: -------------------------------------------------------------------------------- 1 | @TestJWTApi_HostAddress = http://localhost:5059 2 | 3 | GET {{TestJWTApi_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /tests/MiniAuth.Identity/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestJWTApi/TestJWTApi/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /tests/TestCookieApi/TestCookieApi/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mini-software/MiniAuth/HEAD/tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/wwwroot/favicon.ico -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/wwwroot/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Pages/InvalidUser.razor: -------------------------------------------------------------------------------- 1 | @page "/Account/InvalidUser" 2 | 3 | Invalid user 4 | 5 |

Invalid user

6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/Models/RefreshRequest.cs: -------------------------------------------------------------------------------- 1 | namespace MiniAuth.IdentityAuth.Models 2 | { 3 | public sealed class RefreshRequest 4 | { 5 | public string refreshToken { get; init; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestCustomOptions/TestCustomOptions/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using TestMVCWithCookieIdentity 2 | @using TestMVCWithCookieIdentity.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /tests/TestReleaseDefault/TestReleaseDefault/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Frontend_Identity/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "Vue.volar", 4 | "Vue.vscode-typescript-vue-plugin", 5 | "dbaeumer.vscode-eslint", 6 | "esbenp.prettier-vscode" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /tests/IdentityAPIEndpoints/IdentityAPIEndpoints/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreApiAot/TestAspNetCoreApiAot/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreEmpty/TestAspNetCoreEmpty/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /Build.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Frontend_Identity/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/prettierrc", 3 | "semi": false, 4 | "tabWidth": 2, 5 | "singleQuote": true, 6 | "printWidth": 100, 7 | "trailingComma": "none" 8 | } -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/wwwroot/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/TestApiWithoutIdentity/TestApiWithoutIdentity/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/TestBearer/TestBearer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestJWTApi/TestJWTApi/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql.local", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/TestCookieApi/TestCookieApi/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql.local", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql.local", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /tests/TestCustomOptions/TestCustomOptions/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/TestReleaseDefault/TestReleaseDefault/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql.local", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/IdentityAPIEndpoints/IdentityAPIEndpoints/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreApiAot/TestAspNetCoreApiAot/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreEmpty/TestAspNetCoreEmpty/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/TestApiWithoutIdentity/TestApiWithoutIdentity/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql.local", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @using AspNetCoreIdentity.Areas.Identity 3 | @using AspNetCoreIdentity.Areas.Identity.Pages 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Pages/InvalidPasswordReset.razor: -------------------------------------------------------------------------------- 1 | @page "/Account/InvalidPasswordReset" 2 | 3 | Invalid password reset 4 | 5 |

Invalid password reset

6 |

7 | The password reset link is invalid. 8 |

9 | -------------------------------------------------------------------------------- /tests/MiniAuth.Identity/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "JWTKey": "40b9e63e-b264-4939-9f12-60a21d96dfbf" 10 | } 11 | -------------------------------------------------------------------------------- /tests/TestApiWithoutIdentity/TestApiWithoutIdentity/.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "dotnet-ef": { 6 | "version": "8.0.5", 7 | "commands": [ 8 | "dotnet-ef" 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ConfirmEmailModel 3 | @{ 4 | ViewData["Title"] = "Confirm email"; 5 | } 6 | 7 |

@ViewData["Title"]

8 | 9 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /tests/TestCookieApi/TestCookieApi/.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "dotnet-ef": { 6 | "version": "8.0.6", 7 | "commands": [ 8 | "dotnet-ef" 9 | ], 10 | "rollForward": false 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |
6 |

Welcome

7 |

Learn about building Web apps with ASP.NET Core.

8 |
9 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ConfirmEmailModel 3 | @{ 4 | ViewData["Title"] = "Confirm email"; 5 | } 6 | 7 |

@ViewData["Title"]

8 | 9 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @using TestMVCWithCookieIdentity.Areas.Identity 3 | @using TestMVCWithCookieIdentity.Areas.Identity.Pages 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | -------------------------------------------------------------------------------- /DevNote.md: -------------------------------------------------------------------------------- 1 | ## Q&A 2 | 3 | ### Why using Dictionary parameters? 4 | 5 | Because AOT doesn't support Reflecton. 6 | 7 | ### Why not using EF Core? 8 | 9 | Because MiniAuth would like to support multiple .NET Framework. 10 | 11 | ### Why not using Dapper? 12 | 13 | Clean dependency. -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/ConfirmEmailChange.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ConfirmEmailChangeModel 3 | @{ 4 | ViewData["Title"] = "Confirm email change"; 5 | } 6 | 7 |

@ViewData["Title"]

8 | 9 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TestMVC5.Models 4 | { 5 | public class ErrorViewModel 6 | { 7 | public string RequestId { get; set; } 8 | 9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace AspNetCoreIdentity.Models 2 | { 3 | public class ErrorViewModel 4 | { 5 | public string? RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |
6 |

Welcome

7 |

Learn about building Web apps with ASP.NET Core.

8 |
9 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Pages/ForgotPasswordConfirmation.razor: -------------------------------------------------------------------------------- 1 | @page "/Account/ForgotPasswordConfirmation" 2 | 3 | Forgot password confirmation 4 | 5 |

Forgot password confirmation

6 |

7 | Please check your email to reset your password. 8 |

9 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Pages/Lockout.razor: -------------------------------------------------------------------------------- 1 | @page "/Account/Lockout" 2 | 3 | Locked out 4 | 5 |
6 |

Locked out

7 |

This account has been locked out, please try again later.

8 |
9 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TestMVCCore3.Models 4 | { 5 | public class ErrorViewModel 6 | { 7 | public string RequestId { get; set; } 8 | 9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/Models/LoginRequest.cs: -------------------------------------------------------------------------------- 1 | namespace MiniAuth.IdentityAuth.Models 2 | { 3 | public sealed class LoginRequest 4 | { 5 | public string username { get; init; } 6 | 7 | public string password { get; init; } 8 | public bool remember { get; init; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |
6 |

Welcome

7 |

Learn about building Web apps with ASP.NET Core.

8 |
9 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/ConfirmEmailChange.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ConfirmEmailChangeModel 3 | @{ 4 | ViewData["Title"] = "Confirm email change"; 5 | } 6 | 7 |

@ViewData["Title"]

8 | 9 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/RedirectToLogin.razor: -------------------------------------------------------------------------------- 1 | @inject NavigationManager NavigationManager 2 | 3 | @code { 4 | protected override void OnInitialized() 5 | { 6 | NavigationManager.NavigateTo($"Account/Login?returnUrl={Uri.EscapeDataString(NavigationManager.Uri)}", forceLoad: true); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Data/ApplicationUser.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | 3 | namespace BlazorApp.Data 4 | { 5 | // Add profile data for application users by adding properties to the ApplicationUser class 6 | public class ApplicationUser : IdentityUser 7 | { 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace TestMVCWithCookieIdentity.Models 2 | { 3 | public class ErrorViewModel 4 | { 5 | public string? RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |
6 |

Welcome

7 |

Learn about building Web apps with ASP.NET Core.

8 |
9 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ForgotPasswordConfirmation 3 | @{ 4 | ViewData["Title"] = "Forgot password confirmation"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |

9 | Please check your email to reset your password. 10 |

11 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreApiAot/TestAspNetCoreApiAot/TestAspNetCoreApiAot.http: -------------------------------------------------------------------------------- 1 | @TestAspNetCoreApiAot_HostAddress = http://localhost:5170 2 | 3 | GET {{TestAspNetCoreApiAot_HostAddress}}/todos/ 4 | Accept: application/json 5 | 6 | ### 7 | 8 | GET {{TestAspNetCoreApiAot_HostAddress}}/todos/1 9 | Accept: application/json 10 | 11 | ### 12 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Pages/ResetPasswordConfirmation.razor: -------------------------------------------------------------------------------- 1 | @page "/Account/ResetPasswordConfirmation" 2 | Reset password confirmation 3 | 4 |

Reset password confirmation

5 |

6 | Your password has been reset. Please click here to log in. 7 |

8 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/Models/ResponseVo.cs: -------------------------------------------------------------------------------- 1 | namespace MiniAuth.IdentityAuth.Models 2 | { 3 | internal class ResponseVo 4 | { 5 | public bool ok { get; set; } = true; 6 | public int code { get; set; } = 200; 7 | public string message { get; set; } = ""; 8 | public object data { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ForgotPasswordConfirmation 3 | @{ 4 | ViewData["Title"] = "Forgot password confirmation"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |

9 | Please check your email to reset your password. 10 |

11 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/helpers/ViteEnv.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | class ViteEnv { 4 | static get VITE_DEBUG() { 5 | return import.meta.env.VITE_DEBUG; 6 | } 7 | static get VITE_APP_BASE_API() { 8 | return import.meta.env.VITE_APP_BASE_API; 9 | } 10 | } 11 | 12 | export default ViteEnv; 13 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/AccessDenied.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model AccessDeniedModel 3 | @{ 4 | ViewData["Title"] = "Access denied"; 5 | } 6 | 7 |
8 |

@ViewData["Title"]

9 |

You do not have access to this resource.

10 |
11 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LockoutModel 3 | @{ 4 | ViewData["Title"] = "Locked out"; 5 | } 6 | 7 |
8 |

@ViewData["Title"]

9 |

This account has been locked out, please try again later.

10 |
11 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/types/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | 10 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/Pages/Auth.razor: -------------------------------------------------------------------------------- 1 | @page "/auth" 2 | 3 | @using Microsoft.AspNetCore.Authorization 4 | 5 | @attribute [Authorize] 6 | @rendermode InteractiveAuto 7 | 8 | Auth 9 | 10 |

You are authenticated

11 | 12 | 13 | Hello @context.User.Identity?.Name! 14 | 15 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace BlazorApp.Data 5 | { 6 | public class ApplicationDbContext(DbContextOptions options) : IdentityDbContext(options) 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/AccessDenied.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model AccessDeniedModel 3 | @{ 4 | ViewData["Title"] = "Access denied"; 5 | } 6 | 7 |
8 |

@ViewData["Title"]

9 |

You do not have access to this resource.

10 |
11 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LockoutModel 3 | @{ 4 | ViewData["Title"] = "Locked out"; 5 | } 6 | 7 |
8 |

@ViewData["Title"]

9 |

This account has been locked out, please try again later.

10 |
11 | -------------------------------------------------------------------------------- /src/Frontend_Identity/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.dom.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "exclude": ["src/**/__tests__/*"], 5 | "compilerOptions": { 6 | "composite": true, 7 | "noEmit": true, 8 | "baseUrl": ".", 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | }, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ResetPasswordConfirmationModel 3 | @{ 4 | ViewData["Title"] = "Reset password confirmation"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |

9 | Your password has been reset. Please click here to log in. 10 |

11 | -------------------------------------------------------------------------------- /tests/TestJWTApi/TestJWTApi/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace TestJWTApi 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Frontend_Identity/buildExt.js: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | // remove the base URL from the login.js file 3 | { 4 | const filePath = '../MiniAuth.IdentityAuth/wwwroot/login.js'; 5 | const fileData = fs.readFileSync(filePath, 'utf8'); 6 | const updatedData = fileData.replace('http://localhost:5566/MiniAuth/', ''); 7 | fs.writeFileSync(filePath, updatedData, 'utf8'); 8 | } -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ResetPasswordConfirmationModel 3 | @{ 4 | ViewData["Title"] = "Reset password confirmation"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |

9 | Your password has been reset. Please click here to log in. 10 |

11 | -------------------------------------------------------------------------------- /tests/MiniAuth.Tests.AspNetCore/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "MiniAuth.Tests.AspNetCore": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "https://localhost:59456;http://localhost:59457" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/images/logo/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Layer 1 5 | MiniAuth 6 | 7 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/main.ts: -------------------------------------------------------------------------------- 1 | import './assets/css/style.css' 2 | 3 | import { createApp } from 'vue' 4 | import { createPinia } from 'pinia' 5 | 6 | import App from './App.vue' 7 | import router from './router' 8 | 9 | import { i18n } from './i18n' 10 | 11 | const app = createApp(App) 12 | 13 | app.use(i18n) 14 | 15 | app.use(createPinia()) 16 | app.use(router) 17 | 18 | app.mount('#app') 19 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/DownloadPersonalData.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model DownloadPersonalDataModel 3 | @{ 4 | ViewData["Title"] = "Download Your Data"; 5 | ViewData["ActivePage"] = ManageNavPages.PersonalData; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 | @section Scripts { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /tests/TestApiWithoutIdentity/TestApiWithoutIdentity/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace TestApiWithoutIdentity 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/MiniAuthIdentityDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | using MiniAuth.IdentityAuth.Models; 4 | 5 | 6 | public class MiniAuthIdentityDbContext : IdentityDbContext 7 | { 8 | public MiniAuthIdentityDbContext(DbContextOptions options) : base(options) 9 | { 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/wwwroot/assets/UsersView-Hpoy62lu.css: -------------------------------------------------------------------------------- 1 | .page-item.active .page-link[data-v-edb65bec]{color:#fff!important;background:#000!important;--bs-pagination-active-border-color: black}.page-link[data-v-edb65bec]{color:#000!important}.password[data-v-edb65bec]{widows:100%;border:0;border-bottom:1px solid black;outline:0;background-color:#e2e2e2be}input[type=mail][data-v-edb65bec]{widows:100%;border:0;outline:0} 2 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/DownloadPersonalData.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model DownloadPersonalDataModel 3 | @{ 4 | ViewData["Title"] = "Download Your Data"; 5 | ViewData["ActivePage"] = ManageNavPages.PersonalData; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 | @section Scripts { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/Frontend_Identity/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript', 10 | '@vue/eslint-config-prettier/skip-formatting' 11 | ], 12 | parserOptions: { 13 | ecmaVersion: 'latest' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/UserInfo.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorApp.Client 2 | { 3 | // Add properties to this class and update the server and client AuthenticationStateProviders 4 | // to expose more information about the authenticated user to the client. 5 | public class UserInfo 6 | { 7 | public required string UserId { get; set; } 8 | public required string Email { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-BlazorApp-1f25e2bf-c7a8-495b-a383-45d0933c1547;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft.AspNetCore": "Warning" 9 | } 10 | }, 11 | "AllowedHosts": "*" 12 | } 13 | -------------------------------------------------------------------------------- /tests/TestCookieApi/TestCookieApi/TestCookieApi.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Frontend_Identity/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/node18/tsconfig.json", 3 | "include": [ 4 | "vite.config.*", 5 | "vitest.config.*", 6 | "cypress.config.*", 7 | "nightwatch.conf.*", 8 | "playwright.config.*" 9 | ], 10 | "compilerOptions": { 11 | "composite": true, 12 | "noEmit": true, 13 | "module": "ESNext", 14 | "moduleResolution": "Bundler", 15 | "types": ["node"] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace AspNetCoreIdentity.Data 5 | { 6 | public class ApplicationDbContext : IdentityDbContext 7 | { 8 | public ApplicationDbContext(DbContextOptions options) 9 | : base(options) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/TestCustomOptions/TestCustomOptions/TestCustomOptions.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-AspNetCoreIdentity-a0368dc6-6cff-4dc4-8635-e30961549b04;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft.AspNetCore": "Warning" 9 | } 10 | }, 11 | "AllowedHosts": "*" 12 | } 13 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreEmpty/TestAspNetCoreEmpty/TestAspNetCoreEmpty.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/TestReleaseDefault/TestReleaseDefault/TestReleaseDefault.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/_StatusMessage.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | @if (!String.IsNullOrEmpty(Model)) 4 | { 5 | var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success"; 6 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Shared/ManageLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | @layout AccountLayout 3 | 4 |

Manage your account

5 | 6 |
7 |

Change your account settings

8 |
9 |
10 |
11 | 12 |
13 |
14 | @Body 15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/_StatusMessage.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | @if (!String.IsNullOrEmpty(Model)) 4 | { 5 | var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success"; 6 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-TestMVC5-28194656-b764-4faa-8019-96c617ecbb1f;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /tests/TestReleaseDefault/TestReleaseDefault/Program.cs: -------------------------------------------------------------------------------- 1 | namespace TestReleaseDefault 2 | { 3 | public class Program 4 | { 5 | public static void Main(string[] args) 6 | { 7 | var builder = WebApplication.CreateBuilder(args); 8 | builder.Services.AddMiniAuth(); 9 | var app = builder.Build(); 10 | 11 | app.MapGet("/", () => "Hello World!"); 12 | 13 | app.Run(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | @rendermode InteractiveAuto 3 | 4 | Counter 5 | 6 |

Counter

7 | 8 |

Current count: @currentCount

9 | 10 | 11 | 12 | @code { 13 | private int currentCount = 0; 14 | 15 | private void IncrementCount() 16 | { 17 | currentCount++; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace TestMVCWithCookieIdentity.Data 5 | { 6 | public class ApplicationDbContext : IdentityDbContext 7 | { 8 | public ApplicationDbContext(DbContextOptions options) 9 | : base(options) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-TestMVCWithCookieIdentity-f8d2483f-6e9b-4a23-8f1d-fb6a83221825;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft.AspNetCore": "Warning" 9 | } 10 | }, 11 | "AllowedHosts": "*" 12 | } 13 | -------------------------------------------------------------------------------- /src/Frontend_Identity/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | 30 | *.tsbuildinfo 31 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/_StatusMessage.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | @if (!String.IsNullOrEmpty(Model)) 4 | { 5 | var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success"; 6 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-TestMVCCore3-3986119d-c89c-408b-8c08-3a67b6a9bdb6;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/_StatusMessage.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | @if (!String.IsNullOrEmpty(Model)) 4 | { 5 | var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success"; 6 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-size: 14px; 3 | } 4 | 5 | @media (min-width: 768px) { 6 | html { 7 | font-size: 16px; 8 | } 9 | } 10 | 11 | .btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { 12 | box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; 13 | } 14 | 15 | html { 16 | position: relative; 17 | min-height: 100%; 18 | } 19 | 20 | body { 21 | margin-bottom: 60px; 22 | } -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using static Microsoft.AspNetCore.Components.Web.RenderMode 8 | @using Microsoft.AspNetCore.Components.Web.Virtualization 9 | @using Microsoft.JSInterop 10 | @using BlazorApp.Client 11 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreApiAot/TestAspNetCoreApiAot/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "launchUrl": "todos", 9 | "applicationUrl": "http://localhost:5170", 10 | "environmentVariables": { 11 | "ASPNETCORE_ENVIRONMENT": "Development" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace TestMVC5.Data 8 | { 9 | public class ApplicationDbContext : IdentityDbContext 10 | { 11 | public ApplicationDbContext(DbContextOptions options) 12 | : base(options) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-size: 14px; 3 | } 4 | 5 | @media (min-width: 768px) { 6 | html { 7 | font-size: 16px; 8 | } 9 | } 10 | 11 | .btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { 12 | box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; 13 | } 14 | 15 | html { 16 | position: relative; 17 | min-height: 100%; 18 | } 19 | 20 | body { 21 | margin-bottom: 60px; 22 | } -------------------------------------------------------------------------------- /tests/TestBearer/TestBearer/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "Authentication": { 9 | "Schemes": { 10 | "Bearer": { 11 | "ValidAudiences": [ 12 | "http://localhost:64331", 13 | "https://localhost:0", 14 | "http://localhost:5014" 15 | ], 16 | "ValidIssuer": "dotnet-user-jwts" 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/Program.cs: -------------------------------------------------------------------------------- 1 | using BlazorApp.Client; 2 | using Microsoft.AspNetCore.Components.Authorization; 3 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 4 | 5 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 6 | 7 | builder.Services.AddAuthorizationCore(); 8 | builder.Services.AddCascadingAuthenticationState(); 9 | builder.Services.AddSingleton(); 10 | 11 | await builder.Build().RunAsync(); 12 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Data/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace TestMVCCore3.Data 8 | { 9 | public class ApplicationDbContext : IdentityDbContext 10 | { 11 | public ApplicationDbContext(DbContextOptions options) 12 | : base(options) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreApiAot/TestAspNetCoreApiAot/TestAspNetCoreApiAot.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | true 8 | true 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/TestApiWithoutIdentity/TestApiWithoutIdentity/TestApiWithoutIdentity.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Routes.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Frontend_Identity/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | MiniAuth 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/Models/RoleEndpointEntity.cs: -------------------------------------------------------------------------------- 1 | namespace MiniAuth.IdentityAuth.Models 2 | { 3 | public class RoleEndpointEntity 4 | { 5 | public string Id { get; set; } 6 | public string Type { get; set; } = "system"; 7 | public string Name { get; set; } 8 | public string Route { get; set; } 9 | public string[] Methods { get; set; } 10 | public bool Enable { get; set; } 11 | public string[] Roles { get; set; } 12 | public bool RedirectToLoginPage { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using System.Net.Http.Json 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using static Microsoft.AspNetCore.Components.Web.RenderMode 8 | @using Microsoft.AspNetCore.Components.Web.Virtualization 9 | @using Microsoft.JSInterop 10 | @using BlazorApp 11 | @using BlazorApp.Client 12 | @using BlazorApp.Components 13 | -------------------------------------------------------------------------------- /tests/MiniAuth.Identity/MiniAuth.IdentityWeb.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/TestApiWithoutIdentity/TestApiWithoutIdentity/Program.cs: -------------------------------------------------------------------------------- 1 | using MiniAuth.Identity; 2 | 3 | namespace TestApiWithoutIdentity 4 | { 5 | public class Program 6 | { 7 | public static void Main(string[] args) 8 | { 9 | var builder = WebApplication.CreateBuilder(args); 10 | 11 | builder.Services.AddMiniAuth(); 12 | 13 | builder.Services.AddControllers(); 14 | 15 | var app = builder.Build(); 16 | 17 | app.MapControllers(); 18 | 19 | app.Run(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreEmpty/TestAspNetCoreEmpty/Program.cs: -------------------------------------------------------------------------------- 1 | using MiniAuth; 2 | 3 | namespace TestAspNetCoreEmpty 4 | { 5 | public class Program 6 | { 7 | public static void Main(string[] args) 8 | { 9 | var builder = WebApplication.CreateBuilder(args); 10 | MiniAuthOptions.AuthenticationType = MiniAuthOptions.AuthType.Jwt; 11 | builder.Services.AddMiniAuth(); 12 | var app = builder.Build(); 13 | 14 | app.MapGet("/", () => "Hello World!"); 15 | 16 | app.Run(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Main Build 2 | 3 | on: 4 | pull_request: 5 | branches: [ "main" ] 6 | push: 7 | branches: [ "main" ] 8 | 9 | jobs: 10 | vm-job: 11 | name: Ubuntu 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v1 16 | - name: .NET Build 17 | run: dotnet build Build.csproj -c Release /p:CI=true 18 | - name: .NET Test 19 | run: dotnet test Build.csproj -c Release --no-build --logger trx --results-directory ./test-results/ /p:CI=true 20 | env: 21 | EnableTestLogging: true 22 | -------------------------------------------------------------------------------- /src/Frontend_Identity/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import VueJsx from '@vitejs/plugin-vue-jsx' 4 | import { resolve } from 'path'; 5 | const pathResolve = (dir) => { 6 | return resolve(__dirname, dir); 7 | }; 8 | export default defineConfig({ 9 | base: '/miniauth/', 10 | build: { 11 | emptyOutDir: true, 12 | outDir: '../MiniAuth.IdentityAuth/wwwroot/', 13 | }, 14 | plugins: [ 15 | vue(), 16 | VueJsx(), 17 | ], 18 | resolve: { 19 | alias: { 20 | '@': pathResolve('src') 21 | } 22 | } 23 | }) 24 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Layout/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 |
4 | 7 | 8 |
9 |
10 | About 11 |
12 | 13 |
14 | @Body 15 |
16 |
17 |
18 | 19 |
20 | An unhandled error has occurred. 21 | Reload 22 | 🗙 23 |
24 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | MiniAuth 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp.Client/BlazorApp.Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | true 8 | Default 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LogoutModel 3 | @{ 4 | ViewData["Title"] = "Log out"; 5 | } 6 | 7 |
8 |

@ViewData["Title"]

9 | @{ 10 | if (User.Identity?.IsAuthenticated ?? false) 11 | { 12 |
13 | 14 |
15 | } 16 | else 17 | { 18 |

You have successfully logged out of the application.

19 | } 20 | } 21 |
22 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/wwwroot/assets/EndpointsView-M0wP4A-_.js: -------------------------------------------------------------------------------- 1 | import{s as c}from"./service-l-IRifIr.js";import{u as p,r as a,o as _,a as s,c as n,b as t,t as e,F as h,d as m}from"./index-wa5Wqz5d.js";const b={class:"scrollable-container"},f={class:"table table-hover"},g={class:"table-dark"},E={__name:"EndpointsView",setup(v){p(),a("EndPoints");const l=a([]),i=a([]),u=async()=>{l.value=await c.get("api/getAllEndpoints"),i.value=await c.get("api/getRoles")};return _(async()=>{await u()}),(o,y)=>(s(),n("div",b,[t("table",f,[t("thead",null,[t("tr",g,[t("th",null,e(o.$t("Name")),1),t("th",null,e(o.$t("Route")),1)])]),t("tbody",null,[(s(!0),n(h,null,m(l.value,(r,d)=>(s(),n("tr",{key:d},[t("td",null,e(r.Name),1),t("td",null,e(r.Route),1)]))),128))])])]))}};export{E as default}; 2 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/RegisterConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model RegisterConfirmationModel 3 | @{ 4 | ViewData["Title"] = "Register confirmation"; 5 | } 6 | 7 |

@ViewData["Title"]

8 | @{ 9 | if (@Model.DisplayConfirmAccountLink) 10 | { 11 |

12 | This app does not currently have a real email sender registered, see these docs for how to configure a real email sender. 13 | Normally this would be emailed: Click here to confirm your account 14 |

15 | } 16 | else 17 | { 18 |

19 | Please check your email to confirm your account. 20 |

21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LogoutModel 3 | @{ 4 | ViewData["Title"] = "Log out"; 5 | } 6 | 7 |
8 |

@ViewData["Title"]

9 | @{ 10 | if (User.Identity?.IsAuthenticated ?? false) 11 | { 12 |
13 | 14 |
15 | } 16 | else 17 | { 18 |

You have successfully logged out of the application.

19 | } 20 | } 21 |
22 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/RegisterConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model RegisterConfirmationModel 3 | @{ 4 | ViewData["Title"] = "Register confirmation"; 5 | } 6 | 7 |

@ViewData["Title"]

8 | @{ 9 | if (@Model.DisplayConfirmAccountLink) 10 | { 11 |

12 | This app does not currently have a real email sender registered, see these docs for how to configure a real email sender. 13 | Normally this would be emailed: Click here to confirm your account 14 |

15 | } 16 | else 17 | { 18 |

19 | Please check your email to confirm your account. 20 |

21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/Frontend_Identity/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{html,js}'], 4 | theme: { 5 | colors: { 6 | 'blue': '#1fb6ff', 7 | 'purple': '#7e5bef', 8 | 'pink': '#ff49db', 9 | 'orange': '#ff7849', 10 | 'green': '#13ce66', 11 | 'yellow': '#ffc82c', 12 | 'gray-dark': '#273444', 13 | 'gray': '#8492a6', 14 | 'gray-light': '#d3dce6', 15 | }, 16 | fontFamily: { 17 | sans: ['Graphik', 'sans-serif'], 18 | serif: ['Merriweather', 'serif'], 19 | }, 20 | extend: { 21 | spacing: { 22 | '8xl': '96rem', 23 | '9xl': '128rem', 24 | }, 25 | borderRadius: { 26 | '4xl': '2rem', 27 | } 28 | } 29 | }, 30 | } -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | if (ViewData.TryGetValue("ParentLayout", out var parentLayout) && parentLayout != null) 3 | { 4 | Layout = parentLayout.ToString(); 5 | } 6 | else 7 | { 8 | Layout = "/Areas/Identity/Pages/_Layout.cshtml"; 9 | } 10 | } 11 | 12 |

Manage your account

13 | 14 |
15 |

Change your account settings

16 |
17 |
18 |
19 | 20 |
21 |
22 | @RenderBody() 23 |
24 |
25 |
26 | 27 | @section Scripts { 28 | @RenderSection("Scripts", required: false) 29 | } 30 | -------------------------------------------------------------------------------- /tests/TestJWTApi/TestJWTApi/TestJWTApi.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | if (ViewData.TryGetValue("ParentLayout", out var parentLayout) && parentLayout != null) 3 | { 4 | Layout = parentLayout.ToString(); 5 | } 6 | else 7 | { 8 | Layout = "/Areas/Identity/Pages/_Layout.cshtml"; 9 | } 10 | } 11 | 12 |

Manage your account

13 | 14 |
15 |

Change your account settings

16 |
17 |
18 |
19 | 20 |
21 |
22 | @RenderBody() 23 |
24 |
25 |
26 | 27 | @section Scripts { 28 | @RenderSection("Scripts", required: false) 29 | } 30 | -------------------------------------------------------------------------------- /tests/MiniAuth.Tests.AspNetCore/MiniAuth.Tests.AspNetCore.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | MiniAuth.Tests.AspNetCore 4 | net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:23307", 7 | "sslPort": 44304 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TestMVCCore3": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/IdentityUserAccessor.cs: -------------------------------------------------------------------------------- 1 | using BlazorApp.Data; 2 | using Microsoft.AspNetCore.Identity; 3 | 4 | namespace BlazorApp.Components.Account 5 | { 6 | internal sealed class IdentityUserAccessor(UserManager userManager, IdentityRedirectManager redirectManager) 7 | { 8 | public async Task GetRequiredUserAsync(HttpContext context) 9 | { 10 | var user = await userManager.GetUserAsync(context.User); 11 | 12 | if (user is null) 13 | { 14 | redirectManager.RedirectToWithStatus("Account/InvalidUser", $"Error: Unable to load user with ID '{userManager.GetUserId(context.User)}'.", context); 15 | } 16 | 17 | return user; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.Hosting; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace TestMVC5 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.Hosting; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace TestMVCCore3 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:45883", 7 | "sslPort": 44305 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "TestMVC5": { 19 | "commandName": "Project", 20 | "dotnetRunMessages": "true", 21 | "launchBrowser": true, 22 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/TestBearer/TestBearer/TestBearer.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 6974a48a-2e04-4751-9b7f-b33cd2b4d80a 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/TestCookieApi/TestCookieApi/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting.Server.Features; 2 | using Microsoft.AspNetCore.Hosting.Server; 3 | using Microsoft.AspNetCore.Authorization; 4 | 5 | namespace TestCookieApi 6 | { 7 | public class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | var builder = WebApplication.CreateBuilder(args); 12 | builder.Services.AddMiniAuth(); 13 | var app = builder.Build(); 14 | app.MapGet("/", () => 15 | { 16 | return Results.Redirect("/miniauth/index.html"); 17 | }); 18 | app.MapGet("/admin", () => "Is miniauth-admin!") 19 | .RequireAuthorization(new AuthorizeAttribute() { Roles = "miniauth-admin" }) 20 | ; 21 | app.Run(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/MiniAuth.Identity/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:37139", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": false, 16 | "applicationUrl": "http://localhost:5566", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/TestBearer/TestBearer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:64331", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5014", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/TestCookieApi/TestCookieApi/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:6440", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5160", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Shared/ShowRecoveryCodes.razor: -------------------------------------------------------------------------------- 1 | 2 |

Recovery codes

3 | 11 |
12 |
13 | @foreach (var recoveryCode in RecoveryCodes) 14 | { 15 |
16 | @recoveryCode 17 |
18 | } 19 |
20 |
21 | 22 | @code { 23 | [Parameter] 24 | public string[] RecoveryCodes { get; set; } = []; 25 | 26 | [Parameter] 27 | public string? StatusMessage { get; set; } 28 | } 29 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:12838", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5004", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreEmpty/TestAspNetCoreEmpty/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:25158", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5018", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/TestCustomOptions/TestCustomOptions/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:56467", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5221", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/TestReleaseDefault/TestReleaseDefault/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:16090", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5287", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/IdentityAPIEndpoints/IdentityAPIEndpoints/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:37130", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5135", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:44458", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "applicationUrl": "http://localhost:5059", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | } 20 | }, 21 | "IIS Express": { 22 | "commandName": "IISExpress", 23 | "launchBrowser": true, 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | polar: # Replace with a single Polar username 14 | custom: https://mini-software.github.io/ # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/Disable2fa.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model Disable2faModel 3 | @{ 4 | ViewData["Title"] = "Disable two-factor authentication (2FA)"; 5 | ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication; 6 | } 7 | 8 | 9 |

@ViewData["Title"]

10 | 11 | 20 | 21 |
22 |
23 | 24 |
25 |
26 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Shared/AccountLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | @layout BlazorApp.Components.Layout.MainLayout 3 | @inject NavigationManager NavigationManager 4 | 5 | @if (HttpContext is null) 6 | { 7 |

Loading...

8 | } 9 | else 10 | { 11 | @Body 12 | } 13 | 14 | @code { 15 | [CascadingParameter] 16 | private HttpContext? HttpContext { get; set; } 17 | 18 | protected override void OnParametersSet() 19 | { 20 | if (HttpContext is null) 21 | { 22 | // If this code runs, we're currently rendering in interactive mode, so there is no HttpContext. 23 | // The identity pages need to set cookies, so they require an HttpContext. To achieve this we 24 | // must transition back from interactive mode to a server-rendered page. 25 | NavigationManager.Refresh(forceReload: true); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/svg/delete.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 8 | 10 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/Disable2fa.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model Disable2faModel 3 | @{ 4 | ViewData["Title"] = "Disable two-factor authentication (2FA)"; 5 | ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication; 6 | } 7 | 8 | 9 |

@ViewData["Title"]

10 | 11 | 20 | 21 |
22 |
23 | 24 |
25 |
26 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/Helpers/JsonHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using MiniAuth.Identity; 3 | using MiniAuth.IdentityAuth.Models; 4 | 5 | namespace MiniAuth.IdentityAuth.Helpers 6 | { 7 | internal static class JsonHelper 8 | { 9 | public static string ToJson(this object data, int code = 200, string message = null) 10 | { 11 | return JsonSerializer.Serialize(new ResponseVo 12 | { 13 | code = code, 14 | message = message, 15 | data = data 16 | }); 17 | } 18 | public static T GetProperty(this JsonElement data, string key) 19 | { 20 | var obj = default(object); 21 | if (data.TryGetProperty(key, out JsonElement j)) 22 | obj = j.Deserialize(); 23 | if (obj == null) 24 | return default; 25 | return (T)obj; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/IdentityAPIEndpoints/IdentityAPIEndpoints/IdentityAPIEndpoints.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Frontend_Identity/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "useDefineForClassFields": true, 5 | "module": "esnext", 6 | "moduleResolution": "node", 7 | "strict": true, 8 | "jsx": "preserve", 9 | "sourceMap": true, 10 | "resolveJsonModule": true, 11 | "esModuleInterop": true, 12 | "jsxImportSource": "vue", 13 | "lib": ["esnext", "dom"], 14 | "baseUrl": "./", 15 | "allowJs": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "allowSyntheticDefaultImports": true, 18 | "strictFunctionTypes": false, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "experimentalDecorators": true, 22 | "noImplicitAny": false, 23 | "skipLibCheck": true, 24 | "paths": { 25 | "@/*": ["src/*"] 26 | }, 27 | "types": [ 28 | ] 29 | }, 30 | "include": ["src", "types/**/*.d.ts"], 31 | "exclude": ["dist", "node_modules"] 32 | } 33 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/TestMVC5.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | aspnet-TestMVC5-28194656-b764-4faa-8019-96c617ecbb1f 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/TestMVCCore3.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | aspnet-TestMVCCore3-3986119d-c89c-408b-8c08-3a67b6a9bdb6 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/ShowRecoveryCodes.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ShowRecoveryCodesModel 3 | @{ 4 | ViewData["Title"] = "Recovery codes"; 5 | ViewData["ActivePage"] = "TwoFactorAuthentication"; 6 | } 7 | 8 | 9 |

@ViewData["Title"]

10 | 18 |
19 |
20 | @for (var row = 0; row < Model.RecoveryCodes.Length; row += 2) 21 | { 22 | @Model.RecoveryCodes[row] @Model.RecoveryCodes[row + 1]
23 | } 24 |
25 |
26 | -------------------------------------------------------------------------------- /tests/TestApiWithoutIdentity/TestApiWithoutIdentity/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:54086", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": false, 16 | "launchUrl": "weatherforecast", 17 | "applicationUrl": "http://localhost:5075", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "weatherforecast", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/ShowRecoveryCodes.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ShowRecoveryCodesModel 3 | @{ 4 | ViewData["Title"] = "Recovery codes"; 5 | ViewData["ActivePage"] = "TwoFactorAuthentication"; 6 | } 7 | 8 | 9 |

@ViewData["Title"]

10 | 18 |
19 |
20 | @for (var row = 0; row < Model.RecoveryCodes.Length; row += 2) 21 | { 22 | @Model.RecoveryCodes[row] @Model.RecoveryCodes[row + 1]
23 | } 24 |
25 |
26 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using AspNetCoreIdentity.Models; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System.Diagnostics; 4 | 5 | namespace AspNetCoreIdentity.Controllers 6 | { 7 | public class HomeController : Controller 8 | { 9 | private readonly ILogger _logger; 10 | 11 | public HomeController(ILogger logger) 12 | { 13 | _logger = logger; 14 | } 15 | 16 | public IActionResult Index() 17 | { 18 | return View(); 19 | } 20 | 21 | public IActionResult Privacy() 22 | { 23 | return View(); 24 | } 25 | 26 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 27 | public IActionResult Error() 28 | { 29 | return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Shared/StatusMessage.razor: -------------------------------------------------------------------------------- 1 | @if (!string.IsNullOrEmpty(DisplayMessage)) 2 | { 3 | var statusMessageClass = DisplayMessage.StartsWith("Error") ? "danger" : "success"; 4 | 7 | } 8 | 9 | @code { 10 | private string? messageFromCookie; 11 | 12 | [Parameter] 13 | public string? Message { get; set; } 14 | 15 | [CascadingParameter] 16 | private HttpContext HttpContext { get; set; } = default!; 17 | 18 | private string? DisplayMessage => Message ?? messageFromCookie; 19 | 20 | protected override void OnInitialized() 21 | { 22 | messageFromCookie = HttpContext.Request.Cookies[IdentityRedirectManager.StatusCookieName]; 23 | 24 | if (messageFromCookie is not null) 25 | { 26 | HttpContext.Response.Cookies.Delete(IdentityRedirectManager.StatusCookieName); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to Development environment will display more detailed information about the error that occurred. 20 |

21 |

22 | Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. 23 |

24 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/BlazorApp.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | aspnet-BlazorApp-1f25e2bf-c7a8-495b-a383-45d0933c1547 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to Development environment will display more detailed information about the error that occurred. 20 |

21 |

22 | Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. 23 |

24 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/AccessDenied.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Mvc.RazorPages; 6 | 7 | namespace AspNetCoreIdentity.Areas.Identity.Pages.Account 8 | { 9 | /// 10 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 11 | /// directly from your code. This API may change or be removed in future releases. 12 | /// 13 | public class AccessDeniedModel : PageModel 14 | { 15 | /// 16 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 17 | /// directly from your code. This API may change or be removed in future releases. 18 | /// 19 | public void OnGet() 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PersonalDataModel 3 | @{ 4 | ViewData["Title"] = "Personal Data"; 5 | ViewData["ActivePage"] = ManageNavPages.PersonalData; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 |
11 |
12 |

Your account contains personal data that you have given us. This page allows you to download or delete that data.

13 |

14 | Deleting this data will permanently remove your account, and this cannot be recovered. 15 |

16 |
17 | 18 |
19 |

20 | Delete 21 |

22 |
23 |
24 | 25 | @section Scripts { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/ResendEmailConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ResendEmailConfirmationModel 3 | @{ 4 | ViewData["Title"] = "Resend email confirmation"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |

Enter your email.

9 |
10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 | @section Scripts { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/Frontend_Identity/public/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Login Page 7 | 8 | 9 | 10 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/AccessDenied.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Mvc.RazorPages; 6 | 7 | namespace TestMVCWithCookieIdentity.Areas.Identity.Pages.Account 8 | { 9 | /// 10 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 11 | /// directly from your code. This API may change or be removed in future releases. 12 | /// 13 | public class AccessDeniedModel : PageModel 14 | { 15 | /// 16 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 17 | /// directly from your code. This API may change or be removed in future releases. 18 | /// 19 | public void OnGet() 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/wwwroot/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Login Page 7 | 8 | 9 | 10 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ForgotPasswordModel 3 | @{ 4 | ViewData["Title"] = "Forgot your password?"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |

Enter your email.

9 |
10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 | @section Scripts { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PersonalDataModel 3 | @{ 4 | ViewData["Title"] = "Personal Data"; 5 | ViewData["ActivePage"] = ManageNavPages.PersonalData; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 |
11 |
12 |

Your account contains personal data that you have given us. This page allows you to download or delete that data.

13 |

14 | Deleting this data will permanently remove your account, and this cannot be recovered. 15 |

16 |
17 | 18 |
19 |

20 | Delete 21 |

22 |
23 |
24 | 25 | @section Scripts { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/ResendEmailConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ResendEmailConfirmationModel 3 | @{ 4 | ViewData["Title"] = "Resend email confirmation"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |

Enter your email.

9 |
10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 | @section Scripts { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/svg/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ForgotPasswordModel 3 | @{ 4 | ViewData["Title"] = "Forgot your password?"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |

Enter your email.

9 |
10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 | @section Scripts { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/ResetAuthenticator.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ResetAuthenticatorModel 3 | @{ 4 | ViewData["Title"] = "Reset authenticator key"; 5 | ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication; 6 | } 7 | 8 | 9 |

@ViewData["Title"]

10 | 20 |
21 |
22 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | 5 | 27 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/ResetAuthenticator.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ResetAuthenticatorModel 3 | @{ 4 | ViewData["Title"] = "Reset authenticator key"; 5 | ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication; 6 | } 7 | 8 | 9 |

@ViewData["Title"]

10 | 20 |
21 |
22 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Lockout.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace AspNetCoreIdentity.Areas.Identity.Pages.Account 9 | { 10 | /// 11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 12 | /// directly from your code. This API may change or be removed in future releases. 13 | /// 14 | [AllowAnonymous] 15 | public class LockoutModel : PageModel 16 | { 17 | /// 18 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 19 | /// directly from your code. This API may change or be removed in future releases. 20 | /// 21 | public void OnGet() 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/svg/reset_password.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | 5 | 27 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.Extensions.Logging; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | using TestMVC5.Models; 9 | 10 | namespace TestMVC5.Controllers 11 | { 12 | public class HomeController : Controller 13 | { 14 | private readonly ILogger _logger; 15 | 16 | public HomeController(ILogger logger) 17 | { 18 | _logger = logger; 19 | } 20 | 21 | public IActionResult Index() 22 | { 23 | return View(); 24 | } 25 | 26 | public IActionResult Privacy() 27 | { 28 | return View(); 29 | } 30 | 31 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 32 | public IActionResult Error() 33 | { 34 | return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | 5 | 27 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Lockout.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace TestMVCWithCookieIdentity.Areas.Identity.Pages.Account 9 | { 10 | /// 11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 12 | /// directly from your code. This API may change or be removed in future releases. 13 | /// 14 | [AllowAnonymous] 15 | public class LockoutModel : PageModel 16 | { 17 | /// 18 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 19 | /// directly from your code. This API may change or be removed in future releases. 20 | /// 21 | public void OnGet() 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.Extensions.Logging; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | using TestMVCCore3.Models; 9 | 10 | namespace TestMVCCore3.Controllers 11 | { 12 | public class HomeController : Controller 13 | { 14 | private readonly ILogger _logger; 15 | 16 | public HomeController(ILogger logger) 17 | { 18 | _logger = logger; 19 | } 20 | 21 | public IActionResult Index() 22 | { 23 | return View(); 24 | } 25 | 26 | public IActionResult Privacy() 27 | { 28 | return View(); 29 | } 30 | 31 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 32 | public IActionResult Error() 33 | { 34 | return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | 5 | 27 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace AspNetCoreIdentity.Areas.Identity.Pages.Account 9 | { 10 | /// 11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 12 | /// directly from your code. This API may change or be removed in future releases. 13 | /// 14 | [AllowAnonymous] 15 | public class ForgotPasswordConfirmation : PageModel 16 | { 17 | /// 18 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 19 | /// directly from your code. This API may change or be removed in future releases. 20 | /// 21 | public void OnGet() 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace AspNetCoreIdentity.Areas.Identity.Pages.Account 9 | { 10 | /// 11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 12 | /// directly from your code. This API may change or be removed in future releases. 13 | /// 14 | [AllowAnonymous] 15 | public class ResetPasswordConfirmationModel : PageModel 16 | { 17 | /// 18 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 19 | /// directly from your code. This API may change or be removed in future releases. 20 | /// 21 | public void OnGet() 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/MiniAuth.IdentityAuth/MiniAuthStartupFilter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.AspNetCore.Identity; 4 | using System; 5 | using System.Diagnostics; 6 | 7 | namespace MiniAuth.Identity 8 | { 9 | internal class MiniAuthStartupFilter : IStartupFilter 10 | { 11 | public Action Configure(Action next) 12 | { 13 | return builder => 14 | { 15 | Debug.WriteLine("* start MiniAuthStartupFilter"); 16 | builder.UseMiniAuth(); 17 | //builder.UseMiniAuth(); 18 | next(builder); 19 | }; 20 | } 21 | } 22 | internal class EmptyStartupFilter : IStartupFilter 23 | { 24 | public Action Configure(Action next) 25 | { 26 | return builder => 27 | { 28 | Debug.WriteLine("* start EmptyStartupFilter"); 29 | next(builder); 30 | }; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Views/Shared/_Layout.cshtml.css: -------------------------------------------------------------------------------- 1 | /* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | for details on configuring this project to bundle and minify static web assets. */ 3 | 4 | a.navbar-brand { 5 | white-space: normal; 6 | text-align: center; 7 | word-break: break-all; 8 | } 9 | 10 | a { 11 | color: #0077cc; 12 | } 13 | 14 | .btn-primary { 15 | color: #fff; 16 | background-color: #1b6ec2; 17 | border-color: #1861ac; 18 | } 19 | 20 | .nav-pills .nav-link.active, .nav-pills .show > .nav-link { 21 | color: #fff; 22 | background-color: #1b6ec2; 23 | border-color: #1861ac; 24 | } 25 | 26 | .border-top { 27 | border-top: 1px solid #e5e5e5; 28 | } 29 | .border-bottom { 30 | border-bottom: 1px solid #e5e5e5; 31 | } 32 | 33 | .box-shadow { 34 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 35 | } 36 | 37 | button.accept-policy { 38 | font-size: 1rem; 39 | line-height: inherit; 40 | } 41 | 42 | .footer { 43 | position: absolute; 44 | bottom: 0; 45 | width: 100%; 46 | white-space: nowrap; 47 | line-height: 60px; 48 | } 49 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace TestMVCWithCookieIdentity.Areas.Identity.Pages.Account 9 | { 10 | /// 11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 12 | /// directly from your code. This API may change or be removed in future releases. 13 | /// 14 | [AllowAnonymous] 15 | public class ForgotPasswordConfirmation : PageModel 16 | { 17 | /// 18 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 19 | /// directly from your code. This API may change or be removed in future releases. 20 | /// 21 | public void OnGet() 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace TestMVCWithCookieIdentity.Areas.Identity.Pages.Account 9 | { 10 | /// 11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 12 | /// directly from your code. This API may change or be removed in future releases. 13 | /// 14 | [AllowAnonymous] 15 | public class ResetPasswordConfirmationModel : PageModel 16 | { 17 | /// 18 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 19 | /// directly from your code. This API may change or be removed in future releases. 20 | /// 21 | public void OnGet() 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Views/Shared/_Layout.cshtml.css: -------------------------------------------------------------------------------- 1 | /* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | for details on configuring this project to bundle and minify static web assets. */ 3 | 4 | a.navbar-brand { 5 | white-space: normal; 6 | text-align: center; 7 | word-break: break-all; 8 | } 9 | 10 | a { 11 | color: #0077cc; 12 | } 13 | 14 | .btn-primary { 15 | color: #fff; 16 | background-color: #1b6ec2; 17 | border-color: #1861ac; 18 | } 19 | 20 | .nav-pills .nav-link.active, .nav-pills .show > .nav-link { 21 | color: #fff; 22 | background-color: #1b6ec2; 23 | border-color: #1861ac; 24 | } 25 | 26 | .border-top { 27 | border-top: 1px solid #e5e5e5; 28 | } 29 | .border-bottom { 30 | border-bottom: 1px solid #e5e5e5; 31 | } 32 | 33 | .box-shadow { 34 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 35 | } 36 | 37 | button.accept-policy { 38 | font-size: 1rem; 39 | line-height: inherit; 40 | } 41 | 42 | .footer { 43 | position: absolute; 44 | bottom: 0; 45 | width: 100%; 46 | white-space: nowrap; 47 | line-height: 60px; 48 | } 49 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:51322", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 17 | "applicationUrl": "http://localhost:5289", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/GenerateRecoveryCodes.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model GenerateRecoveryCodesModel 3 | @{ 4 | ViewData["Title"] = "Generate two-factor authentication (2FA) recovery codes"; 5 | ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication; 6 | } 7 | 8 | 9 |

@ViewData["Title"]

10 | 23 |
24 |
25 | 26 |
27 |
28 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/GenerateRecoveryCodes.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model GenerateRecoveryCodesModel 3 | @{ 4 | ViewData["Title"] = "Generate two-factor authentication (2FA) recovery codes"; 5 | ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication; 6 | } 7 | 8 | 9 |

@ViewData["Title"]

10 | 23 |
24 |
25 | 26 |
27 |
28 | -------------------------------------------------------------------------------- /tests/TestJWTApi/TestJWTApi/Controllers/WeatherForecastController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace TestJWTApi.Controllers 4 | { 5 | [ApiController] 6 | [Route("[controller]")] 7 | public class WeatherForecastController : ControllerBase 8 | { 9 | private static readonly string[] Summaries = new[] 10 | { 11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 12 | }; 13 | 14 | private readonly ILogger _logger; 15 | 16 | public WeatherForecastController(ILogger logger) 17 | { 18 | _logger = logger; 19 | } 20 | 21 | [HttpGet] 22 | public IEnumerable Get() 23 | { 24 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 25 | { 26 | Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), 27 | TemperatureC = Random.Shared.Next(-20, 55), 28 | Summary = Summaries[Random.Shared.Next(Summaries.Length)] 29 | }) 30 | .ToArray(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/TestBearer/TestBearer/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Authentication; 2 | using Microsoft.AspNetCore.Identity; 3 | using Microsoft.IdentityModel.Tokens; 4 | using MiniAuth; 5 | using System.Text; 6 | 7 | namespace TestBearer 8 | { 9 | public class Program 10 | { 11 | public static void Main(string[] args) 12 | { 13 | var builder = WebApplication.CreateBuilder(args); 14 | builder.Services.AddMiniAuth(options:(options)=> { 15 | options.AuthenticationType = AuthType.BearerJwt; 16 | options.JWTKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("6ee3edbf-488e-4484-9c2c-e3ffa6dcbc09")); 17 | }); 18 | 19 | builder.Services.AddEndpointsApiExplorer(); 20 | builder.Services.AddSwaggerGen(); 21 | 22 | var app = builder.Build(); 23 | 24 | app.MapGet("/", () => "Hello World!") 25 | .RequireAuthorization(); 26 | ; 27 | 28 | if (app.Environment.IsDevelopment()) 29 | { 30 | app.UseSwagger(); 31 | app.UseSwaggerUI(); 32 | } 33 | 34 | app.Run(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/TestJWTApi/TestJWTApi.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.8.34330.188 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestJWTApi", "TestJWTApi\TestJWTApi.csproj", "{C644AE74-FED9-4C63-9C81-D1CE8DE4CD78}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {C644AE74-FED9-4C63-9C81-D1CE8DE4CD78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {C644AE74-FED9-4C63-9C81-D1CE8DE4CD78}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {C644AE74-FED9-4C63-9C81-D1CE8DE4CD78}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {C644AE74-FED9-4C63-9C81-D1CE8DE4CD78}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {F4EF91A3-92FD-45A0-AA57-8FD95B64F34C} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/wwwroot/lib/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright OpenJS Foundation and other contributors, https://openjsf.org/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tests/MiniAuth.Identity/MiniAuth.Identity.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.5.002.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MiniAuth.Identity", "MiniAuth.Identity.csproj", "{F4E12174-4E3E-4085-91FD-D345F832A055}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F4E12174-4E3E-4085-91FD-D345F832A055}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F4E12174-4E3E-4085-91FD-D345F832A055}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F4E12174-4E3E-4085-91FD-D345F832A055}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {F4E12174-4E3E-4085-91FD-D345F832A055}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5E89EFDF-64B1-4B60-A549-98C9B79973D8} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/assets/svg/save.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/LoginWithRecoveryCode.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LoginWithRecoveryCodeModel 3 | @{ 4 | ViewData["Title"] = "Recovery code verification"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |
9 |

10 | You have requested to log in with a recovery code. This login will not be remembered until you provide 11 | an authenticator app code at log in or disable 2FA and log in again. 12 |

13 |
14 |
15 |
16 | 17 |
18 | 19 | 20 | 21 |
22 | 23 |
24 |
25 |
26 | 27 | @section Scripts { 28 | 29 | } -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/wwwroot/lib/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright OpenJS Foundation and other contributors, https://openjsf.org/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/LoginWithRecoveryCode.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LoginWithRecoveryCodeModel 3 | @{ 4 | ViewData["Title"] = "Recovery code verification"; 5 | } 6 | 7 |

@ViewData["Title"]

8 |
9 |

10 | You have requested to log in with a recovery code. This login will not be remembered until you provide 11 | an authenticator app code at log in or disable 2FA and log in again. 12 |

13 |
14 |
15 |
16 | 17 |
18 | 19 | 20 | 21 |
22 | 23 |
24 |
25 |
26 | 27 | @section Scripts { 28 | 29 | } -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Pages/Manage/PersonalData.razor: -------------------------------------------------------------------------------- 1 | @page "/Account/Manage/PersonalData" 2 | 3 | @inject IdentityUserAccessor UserAccessor 4 | 5 | Personal Data 6 | 7 | 8 |

Personal Data

9 | 10 |
11 |
12 |

Your account contains personal data that you have given us. This page allows you to download or delete that data.

13 |

14 | Deleting this data will permanently remove your account, and this cannot be recovered. 15 |

16 |
17 | 18 | 19 | 20 |

21 | Delete 22 |

23 |
24 |
25 | 26 | @code { 27 | [CascadingParameter] 28 | private HttpContext HttpContext { get; set; } = default!; 29 | 30 | protected override async Task OnInitializedAsync() 31 | { 32 | _ = await UserAccessor.GetRequiredUserAsync(HttpContext); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/TestMVC5/TestMVC5/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tests/TestMVCCore3/TestMVCCore3/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.8.34330.188 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetCoreIdentity", "AspNetCoreIdentity\AspNetCoreIdentity.csproj", "{F456F25A-82D0-42CC-9FE4-133740E0B8F7}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F456F25A-82D0-42CC-9FE4-133740E0B8F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F456F25A-82D0-42CC-9FE4-133740E0B8F7}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F456F25A-82D0-42CC-9FE4-133740E0B8F7}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {F456F25A-82D0-42CC-9FE4-133740E0B8F7}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {677BC1BF-D39D-4439-8AE4-F80314E0E0BF} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2021 Twitter, Inc. 4 | Copyright (c) 2011-2021 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tests/TestAspNetCoreApiAot/TestAspNetCoreApiAot.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.8.34330.188 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestAspNetCoreApiAot", "TestAspNetCoreApiAot\TestAspNetCoreApiAot.csproj", "{597416A4-A732-48F6-8140-1FAD0FA7D520}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {597416A4-A732-48F6-8140-1FAD0FA7D520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {597416A4-A732-48F6-8140-1FAD0FA7D520}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {597416A4-A732-48F6-8140-1FAD0FA7D520}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {597416A4-A732-48F6-8140-1FAD0FA7D520}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {FEC23E2F-E0CB-43E0-9757-B84473B7A3E4} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) .NET Foundation and Contributors 4 | 5 | All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2021 Twitter, Inc. 4 | Copyright (c) 2011-2021 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) .NET Foundation and Contributors 4 | 5 | All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /src/Frontend_Identity/src/router/index.ts: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router' 2 | 3 | const routes = [ 4 | { 5 | path: '/', 6 | name: 'Endpoints', 7 | component: () => import('@/views/EndpointsView.vue'), 8 | meta: { 9 | title: 'Endpoints' 10 | } 11 | }, 12 | { 13 | path: '/roles', 14 | name: 'Roles', 15 | component: () => import('@/views/RolesView.vue'), 16 | meta: { 17 | title: 'Roles' 18 | } 19 | }, 20 | { 21 | path: '/users', 22 | name: 'Users', 23 | component: () => import('@/views/UsersView.vue'), 24 | meta: { 25 | title: 'Users' 26 | } 27 | } 28 | ] 29 | 30 | const router = createRouter({ 31 | history: createWebHashHistory(import.meta.env.BASE_URL), 32 | routes, 33 | scrollBehavior(to, from, savedPosition) { 34 | return savedPosition ?? { left: 0, top: 0 } 35 | } 36 | }) 37 | 38 | router.beforeEach((to, from, next) => { 39 | // if localStorage has key 'X-MiniAuth-Token' or cookie .AspNetCore.Identity.Application then continue else redirect to login.html page 40 | // if (localStorage.getItem('X-MiniAuth-Token') ) { 41 | // next() 42 | // } else { 43 | // window.location.href = 'login.html' 44 | // } 45 | next() 46 | }) 47 | 48 | export default router 49 | -------------------------------------------------------------------------------- /tests/TestJWTApi/TestJWTApi/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:50460", 8 | "sslPort": 44379 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "weatherforecast", 17 | "applicationUrl": "http://localhost:5059", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "weatherforecast", 27 | "applicationUrl": "https://localhost:7157;http://localhost:5059", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "weatherforecast", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/_ManageNav.cshtml: -------------------------------------------------------------------------------- 1 | @inject SignInManager SignInManager 2 | @{ 3 | var hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any(); 4 | } 5 | 16 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | using System; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Identity; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace AspNetCoreIdentity.Areas.Identity.Pages.Account.Manage 11 | { 12 | public class PersonalDataModel : PageModel 13 | { 14 | private readonly UserManager _userManager; 15 | private readonly ILogger _logger; 16 | 17 | public PersonalDataModel( 18 | UserManager userManager, 19 | ILogger logger) 20 | { 21 | _userManager = userManager; 22 | _logger = logger; 23 | } 24 | 25 | public async Task OnGet() 26 | { 27 | var user = await _userManager.GetUserAsync(User); 28 | if (user == null) 29 | { 30 | return NotFound($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 31 | } 32 | 33 | return Page(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/_ManageNav.cshtml: -------------------------------------------------------------------------------- 1 | @inject SignInManager SignInManager 2 | @{ 3 | var hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any(); 4 | } 5 | 16 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/DeletePersonalData.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model DeletePersonalDataModel 3 | @{ 4 | ViewData["Title"] = "Delete Personal Data"; 5 | ViewData["ActivePage"] = ManageNavPages.PersonalData; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 | 15 | 16 |
17 |
18 | 19 | @if (Model.RequirePassword) 20 | { 21 |
22 | 23 | 24 | 25 |
26 | } 27 | 28 |
29 |
30 | 31 | @section Scripts { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/IdentityNoOpEmailSender.cs: -------------------------------------------------------------------------------- 1 | using BlazorApp.Data; 2 | using Microsoft.AspNetCore.Identity; 3 | using Microsoft.AspNetCore.Identity.UI.Services; 4 | 5 | namespace BlazorApp.Components.Account 6 | { 7 | // Remove the "else if (EmailSender is IdentityNoOpEmailSender)" block from RegisterConfirmation.razor after updating with a real implementation. 8 | internal sealed class IdentityNoOpEmailSender : IEmailSender 9 | { 10 | private readonly IEmailSender emailSender = new NoOpEmailSender(); 11 | 12 | public Task SendConfirmationLinkAsync(ApplicationUser user, string email, string confirmationLink) => 13 | emailSender.SendEmailAsync(email, "Confirm your email", $"Please confirm your account by clicking here."); 14 | 15 | public Task SendPasswordResetLinkAsync(ApplicationUser user, string email, string resetLink) => 16 | emailSender.SendEmailAsync(email, "Reset your password", $"Please reset your password by clicking here."); 17 | 18 | public Task SendPasswordResetCodeAsync(ApplicationUser user, string email, string resetCode) => 19 | emailSender.SendEmailAsync(email, "Reset your password", $"Please reset your password using the following code: {resetCode}"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/Error" 2 | @using System.Diagnostics 3 | 4 | Error 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (ShowRequestId) 10 | { 11 |

12 | Request ID: @RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | 27 | @code{ 28 | [CascadingParameter] 29 | private HttpContext? HttpContext { get; set; } 30 | 31 | private string? RequestId { get; set; } 32 | private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 33 | 34 | protected override void OnInitialized() => 35 | RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; 36 | } 37 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | using System; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Identity; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace TestMVCWithCookieIdentity.Areas.Identity.Pages.Account.Manage 11 | { 12 | public class PersonalDataModel : PageModel 13 | { 14 | private readonly UserManager _userManager; 15 | private readonly ILogger _logger; 16 | 17 | public PersonalDataModel( 18 | UserManager userManager, 19 | ILogger logger) 20 | { 21 | _userManager = userManager; 22 | _logger = logger; 23 | } 24 | 25 | public async Task OnGet() 26 | { 27 | var user = await _userManager.GetUserAsync(User); 28 | if (user == null) 29 | { 30 | return NotFound($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 31 | } 32 | 33 | return Page(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/DeletePersonalData.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model DeletePersonalDataModel 3 | @{ 4 | ViewData["Title"] = "Delete Personal Data"; 5 | ViewData["ActivePage"] = ManageNavPages.PersonalData; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 | 15 | 16 |
17 |
18 | 19 | @if (Model.RequirePassword) 20 | { 21 |
22 | 23 | 24 | 25 |
26 | } 27 | 28 |
29 |
30 | 31 | @section Scripts { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/Areas/Identity/Pages/Account/Manage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Profile"; 5 | ViewData["ActivePage"] = ManageNavPages.Index; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 |
18 |
19 | 20 | 21 | 22 |
23 | 24 |
25 |
26 |
27 | 28 | @section Scripts { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /tests/TestMVCWithCookieIdentity/TestMVCWithCookieIdentity/Areas/Identity/Pages/Account/Manage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Profile"; 5 | ViewData["ActivePage"] = ManageNavPages.Index; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 |
18 |
19 | 20 | 21 | 22 |
23 | 24 |
25 |
26 |
27 | 28 | @section Scripts { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /tests/AspNetCoreIdentity/AspNetCoreIdentity/AspNetCoreIdentity.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | aspnet-AspNetCoreIdentity-a0368dc6-6cff-4dc4-8635-e30961549b04 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | all 19 | runtime; build; native; contentfiles; analyzers; buildtransitive 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/BlazorApp/BlazorApp/BlazorApp/Components/Account/Shared/ManageNavMenu.razor: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @using BlazorApp.Data 3 | 4 | @inject SignInManager SignInManager 5 | 6 | 29 | 30 | @code { 31 | private bool hasExternalLogins; 32 | 33 | protected override async Task OnInitializedAsync() 34 | { 35 | hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any(); 36 | } 37 | } 38 | --------------------------------------------------------------------------------