Skip to content

Commit 9ce356d

Browse files
authored
Merge pull request #35652 from dotnet/main
2 parents 22ac421 + 1c83128 commit 9ce356d

File tree

8 files changed

+39
-17
lines changed

8 files changed

+39
-17
lines changed

.github/workflows/blazor-hybrid-issue-processing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
issue_number: context.issue.number,
1818
owner: context.repo.owner,
1919
repo: context.repo.repo,
20-
body: `### 🌱🐇 **_Spring is here!!_** 🐣🌻
20+
body: `### 🏖️🌞 **_Summertime!! Woot!!_** 🏐⛵
2121
2222
A green dinosaur 🦖 will be along shortly to assist. *Stand-by ........*`
2323
})

.github/workflows/blazor-issue-processing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
issue_number: context.issue.number,
2323
owner: context.repo.owner,
2424
repo: context.repo.repo,
25-
body: `### 🌱🐇 **_Spring is here!!_** 🐣🌻
25+
body: `### 🏖️🌞 **_Summertime!! Woot!!_** 🏐⛵
2626
2727
*Stand-by!* ... A green dinosaur 🦖 will be along shortly to assist.`
2828
})

aspnetcore/blazor/components/js-spa-frameworks.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,6 @@ The following `Counter` component uses an `IncrementAmount` parameter to set the
378378
`Counter.razor`:
379379

380380
```razor
381-
@page "/counter"
382-
383381
<h1>Counter</h1>
384382
385383
<p role="status">Current count: @currentCount</p>

aspnetcore/security/authentication/ws-federation.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,42 +74,66 @@ By default, the new middleware:
7474

7575
![Microsoft Entra ID: App registration properties](ws-federation/_static/AadAppIdUri.png)
7676

77+
:::moniker range=">= aspnetcore-2.1"
78+
7779
## Use WS-Federation without ASP.NET Core Identity
7880

7981
The WS-Federation middleware can be used without Identity. For example:
82+
83+
:::moniker-end
84+
8085
:::moniker range=">= aspnetcore-3.0"
81-
[!code-csharp[](ws-federation/samples/StartupNon31.cs?name=snippet)]
86+
87+
:::code language="csharp" source="ws-federation/samples/StartupNon31.cs" id="snippet":::
88+
8289
:::moniker-end
8390

8491
:::moniker range=">= aspnetcore-2.1 < aspnetcore-3.0"
85-
[!code-csharp[](ws-federation/samples/StartupNon21.cs?name=snippet)]
92+
93+
:::code language="csharp" source="ws-federation/samples/StartupNon21.cs" id="snippet":::
94+
8695
:::moniker-end
8796

97+
:::moniker range=">= aspnetcore-2.1"
98+
8899
## Add WS-Federation as an external login provider for ASP.NET Core Identity
89100

90101
* Add a dependency on [Microsoft.AspNetCore.Authentication.WsFederation](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.WsFederation) to the project.
102+
91103
* Add WS-Federation to `Startup.ConfigureServices`:
92104

105+
:::moniker-end
106+
93107
:::moniker range=">= aspnetcore-3.0"
94-
[!code-csharp[](ws-federation/samples/Startup31.cs?name=snippet)]
108+
109+
:::code language="csharp" source="ws-federation/samples/Startup31.cs" id="snippet":::
110+
111+
[!INCLUDE [default settings configuration](social/includes/default-settings.md)]
112+
95113
:::moniker-end
96114

97115
:::moniker range=">= aspnetcore-2.1 < aspnetcore-3.0"
98-
[!code-csharp[](ws-federation/samples/Startup21.cs?name=snippet)]
99-
:::moniker-end
116+
117+
:::code language="csharp" source="ws-federation/samples/Startup21.cs" id="snippet":::
100118

101119
[!INCLUDE [default settings configuration](social/includes/default-settings.md)]
102120

121+
:::moniker-end
122+
103123
### Log in with WS-Federation
104124

105125
Browse to the app and click the **Log in** link in the nav header. There's an option to log in with WsFederation:
126+
106127
![Log in page](ws-federation/_static/WsFederationButton.png)
107128

108129
With ADFS as the provider, the button redirects to an ADFS sign-in page:
130+
109131
![ADFS sign-in page](ws-federation/_static/AdfsLoginPage.png)
110132

111133
With Microsoft Entra ID as the provider, the button redirects to a Microsoft Entra ID sign-in page:
134+
112135
![Microsoft Entra ID sign-in page](ws-federation/_static/AadSignIn.png)
113136

114137
A successful sign-in for a new user redirects to the app's user registration page:
138+
115139
![Register page](ws-federation/_static/Register.png)

aspnetcore/security/authentication/ws-federation/samples/Startup21.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public Startup(IConfiguration configuration)
2525
public IConfiguration Configuration { get; }
2626

2727
// This method gets called by the runtime. Use this method to add services to the container.
28-
#region snippet
28+
// <snippet>
2929
public void ConfigureServices(IServiceCollection services)
3030
{
3131
services.AddDbContext<ApplicationDbContext>(options =>
@@ -50,7 +50,7 @@ public void ConfigureServices(IServiceCollection services)
5050

5151
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
5252
}
53-
#endregion
53+
// </snippet>
5454

5555
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
5656
public void Configure(IApplicationBuilder app, IHostingEnvironment env)

aspnetcore/security/authentication/ws-federation/samples/Startup31.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public Startup(IConfiguration configuration)
1818

1919
public IConfiguration Configuration { get; }
2020

21-
#region snippet
21+
// <snippet>
2222
public void ConfigureServices(IServiceCollection services)
2323
{
2424
services.AddDbContext<ApplicationDbContext>(options =>
@@ -45,7 +45,7 @@ public void ConfigureServices(IServiceCollection services)
4545
services.AddControllersWithViews();
4646
services.AddRazorPages();
4747
}
48-
#endregion
48+
// </snippet>
4949

5050
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
5151
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)

aspnetcore/security/authentication/ws-federation/samples/StartupNon21.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public Startup(IConfiguration configuration)
1717

1818
public IConfiguration Configuration { get; }
1919

20-
#region snippet
20+
// <snippet>
2121
public void ConfigureServices(IServiceCollection services)
2222
{
2323
services.AddAuthentication(sharedOptions =>
@@ -62,7 +62,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
6262
template: "{controller=Home}/{action=Index}/{id?}");
6363
});
6464
}
65-
#endregion
65+
// </snippet>
6666

6767
}
6868
}

aspnetcore/security/authentication/ws-federation/samples/StartupNon31.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public Startup(IConfiguration configuration)
1717

1818
public IConfiguration Configuration { get; }
1919

20-
#region snippet
20+
// <snippet>
2121
public void ConfigureServices(IServiceCollection services)
2222
{
2323
services.AddAuthentication(sharedOptions =>
@@ -64,6 +64,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
6464
endpoints.MapRazorPages();
6565
});
6666
}
67-
#endregion
67+
// </snippet>
6868
}
6969
}

0 commit comments

Comments
 (0)