diff --git a/.github/workflows/blazor-hybrid-issue-processing.yml b/.github/workflows/blazor-hybrid-issue-processing.yml index 144ac011002c..950431598b57 100644 --- a/.github/workflows/blazor-hybrid-issue-processing.yml +++ b/.github/workflows/blazor-hybrid-issue-processing.yml @@ -17,7 +17,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `### 🌱🐇 **_Spring is here!!_** 🐣🌻 + body: `### 🏖️🌞 **_Summertime!! Woot!!_** 🏐⛵ A green dinosaur 🦖 will be along shortly to assist. *Stand-by ........*` }) diff --git a/.github/workflows/blazor-issue-processing.yml b/.github/workflows/blazor-issue-processing.yml index f8045d46ff8e..650a645b59de 100644 --- a/.github/workflows/blazor-issue-processing.yml +++ b/.github/workflows/blazor-issue-processing.yml @@ -22,7 +22,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `### 🌱🐇 **_Spring is here!!_** 🐣🌻 + body: `### 🏖️🌞 **_Summertime!! Woot!!_** 🏐⛵ *Stand-by!* ... A green dinosaur 🦖 will be along shortly to assist.` }) diff --git a/aspnetcore/blazor/components/js-spa-frameworks.md b/aspnetcore/blazor/components/js-spa-frameworks.md index 65cb07709e56..7cb48462ae66 100644 --- a/aspnetcore/blazor/components/js-spa-frameworks.md +++ b/aspnetcore/blazor/components/js-spa-frameworks.md @@ -378,8 +378,6 @@ The following `Counter` component uses an `IncrementAmount` parameter to set the `Counter.razor`: ```razor -@page "/counter" -

Counter

Current count: @currentCount

diff --git a/aspnetcore/security/authentication/ws-federation.md b/aspnetcore/security/authentication/ws-federation.md index 8dd627b83759..4af86082a1c0 100644 --- a/aspnetcore/security/authentication/ws-federation.md +++ b/aspnetcore/security/authentication/ws-federation.md @@ -74,42 +74,66 @@ By default, the new middleware: ![Microsoft Entra ID: App registration properties](ws-federation/_static/AadAppIdUri.png) +:::moniker range=">= aspnetcore-2.1" + ## Use WS-Federation without ASP.NET Core Identity The WS-Federation middleware can be used without Identity. For example: + +:::moniker-end + :::moniker range=">= aspnetcore-3.0" -[!code-csharp[](ws-federation/samples/StartupNon31.cs?name=snippet)] + +:::code language="csharp" source="ws-federation/samples/StartupNon31.cs" id="snippet"::: + :::moniker-end :::moniker range=">= aspnetcore-2.1 < aspnetcore-3.0" -[!code-csharp[](ws-federation/samples/StartupNon21.cs?name=snippet)] + +:::code language="csharp" source="ws-federation/samples/StartupNon21.cs" id="snippet"::: + :::moniker-end +:::moniker range=">= aspnetcore-2.1" + ## Add WS-Federation as an external login provider for ASP.NET Core Identity * Add a dependency on [Microsoft.AspNetCore.Authentication.WsFederation](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.WsFederation) to the project. + * Add WS-Federation to `Startup.ConfigureServices`: +:::moniker-end + :::moniker range=">= aspnetcore-3.0" -[!code-csharp[](ws-federation/samples/Startup31.cs?name=snippet)] + +:::code language="csharp" source="ws-federation/samples/Startup31.cs" id="snippet"::: + +[!INCLUDE [default settings configuration](social/includes/default-settings.md)] + :::moniker-end :::moniker range=">= aspnetcore-2.1 < aspnetcore-3.0" -[!code-csharp[](ws-federation/samples/Startup21.cs?name=snippet)] -:::moniker-end + +:::code language="csharp" source="ws-federation/samples/Startup21.cs" id="snippet"::: [!INCLUDE [default settings configuration](social/includes/default-settings.md)] +:::moniker-end + ### Log in with WS-Federation Browse to the app and click the **Log in** link in the nav header. There's an option to log in with WsFederation: + ![Log in page](ws-federation/_static/WsFederationButton.png) With ADFS as the provider, the button redirects to an ADFS sign-in page: + ![ADFS sign-in page](ws-federation/_static/AdfsLoginPage.png) With Microsoft Entra ID as the provider, the button redirects to a Microsoft Entra ID sign-in page: + ![Microsoft Entra ID sign-in page](ws-federation/_static/AadSignIn.png) A successful sign-in for a new user redirects to the app's user registration page: + ![Register page](ws-federation/_static/Register.png) diff --git a/aspnetcore/security/authentication/ws-federation/samples/Startup21.cs b/aspnetcore/security/authentication/ws-federation/samples/Startup21.cs index 9e9986af63ac..84a53d4b8bf2 100644 --- a/aspnetcore/security/authentication/ws-federation/samples/Startup21.cs +++ b/aspnetcore/security/authentication/ws-federation/samples/Startup21.cs @@ -25,7 +25,7 @@ public Startup(IConfiguration configuration) public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. - #region snippet + // public void ConfigureServices(IServiceCollection services) { services.AddDbContext(options => @@ -50,7 +50,7 @@ public void ConfigureServices(IServiceCollection services) services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); } - #endregion + // // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) diff --git a/aspnetcore/security/authentication/ws-federation/samples/Startup31.cs b/aspnetcore/security/authentication/ws-federation/samples/Startup31.cs index 3e971e41ced1..9d01140d2287 100644 --- a/aspnetcore/security/authentication/ws-federation/samples/Startup31.cs +++ b/aspnetcore/security/authentication/ws-federation/samples/Startup31.cs @@ -18,7 +18,7 @@ public Startup(IConfiguration configuration) public IConfiguration Configuration { get; } - #region snippet + // public void ConfigureServices(IServiceCollection services) { services.AddDbContext(options => @@ -45,7 +45,7 @@ public void ConfigureServices(IServiceCollection services) services.AddControllersWithViews(); services.AddRazorPages(); } - #endregion + // // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) diff --git a/aspnetcore/security/authentication/ws-federation/samples/StartupNon21.cs b/aspnetcore/security/authentication/ws-federation/samples/StartupNon21.cs index 2cb79fac4477..8fa07b9cdc14 100644 --- a/aspnetcore/security/authentication/ws-federation/samples/StartupNon21.cs +++ b/aspnetcore/security/authentication/ws-federation/samples/StartupNon21.cs @@ -17,7 +17,7 @@ public Startup(IConfiguration configuration) public IConfiguration Configuration { get; } - #region snippet + // public void ConfigureServices(IServiceCollection services) { services.AddAuthentication(sharedOptions => @@ -62,7 +62,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) template: "{controller=Home}/{action=Index}/{id?}"); }); } - #endregion + // } } diff --git a/aspnetcore/security/authentication/ws-federation/samples/StartupNon31.cs b/aspnetcore/security/authentication/ws-federation/samples/StartupNon31.cs index 4d67d1256dea..4ba1c52b2bef 100644 --- a/aspnetcore/security/authentication/ws-federation/samples/StartupNon31.cs +++ b/aspnetcore/security/authentication/ws-federation/samples/StartupNon31.cs @@ -17,7 +17,7 @@ public Startup(IConfiguration configuration) public IConfiguration Configuration { get; } - #region snippet + // public void ConfigureServices(IServiceCollection services) { services.AddAuthentication(sharedOptions => @@ -64,6 +64,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) endpoints.MapRazorPages(); }); } - #endregion + // } }