Skip to content

Commit 77a17db

Browse files
authored
Update WS-Fed article versioning (#35657)
1 parent 1c83128 commit 77a17db

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

aspnetcore/security/authentication/ws-federation.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
title: Authenticate users with WS-Federation in ASP.NET Core
33
author: chlowell
44
description: This tutorial demonstrates how to use WS-Federation in an ASP.NET Core app.
5+
monikerRange: '>= aspnetcore-2.1'
56
ms.author: wpickett
67
ms.custom: mvc
78
ms.date: 01/16/2019
89
uid: security/authentication/ws-federation
910
---
1011
# Authenticate users with WS-Federation in ASP.NET Core
1112

13+
[!INCLUDE[](~/includes/not-latest-version.md)]
14+
1215
This tutorial demonstrates how to enable users to sign in with a WS-Federation authentication provider like Active Directory Federation Services (ADFS) or [Microsoft Entra ID](/azure/active-directory/). It uses the ASP.NET Core sample app described in [Facebook, Google, and external provider authentication](xref:security/authentication/social/index).
1316

1417
For ASP.NET Core apps, WS-Federation support is provided by [Microsoft.AspNetCore.Authentication.WsFederation](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.WsFederation). This component is ported from [Microsoft.Owin.Security.WsFederation](https://www.nuget.org/packages/Microsoft.Owin.Security.WsFederation) and shares many of that component's mechanics. However, the components differ in a couple of important ways.
@@ -74,52 +77,42 @@ By default, the new middleware:
7477

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

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

8182
The WS-Federation middleware can be used without Identity. For example:
8283

83-
:::moniker-end
84-
8584
:::moniker range=">= aspnetcore-3.0"
8685

8786
:::code language="csharp" source="ws-federation/samples/StartupNon31.cs" id="snippet":::
8887

8988
:::moniker-end
9089

91-
:::moniker range=">= aspnetcore-2.1 < aspnetcore-3.0"
90+
:::moniker range="< aspnetcore-3.0"
9291

9392
:::code language="csharp" source="ws-federation/samples/StartupNon21.cs" id="snippet":::
9493

9594
:::moniker-end
9695

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

10198
* Add a dependency on [Microsoft.AspNetCore.Authentication.WsFederation](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.WsFederation) to the project.
10299

103100
* Add WS-Federation to `Startup.ConfigureServices`:
104101

105-
:::moniker-end
106-
107102
:::moniker range=">= aspnetcore-3.0"
108103

109104
:::code language="csharp" source="ws-federation/samples/Startup31.cs" id="snippet":::
110105

111-
[!INCLUDE [default settings configuration](social/includes/default-settings.md)]
112-
113106
:::moniker-end
114107

115-
:::moniker range=">= aspnetcore-2.1 < aspnetcore-3.0"
108+
:::moniker range="< aspnetcore-3.0"
116109

117110
:::code language="csharp" source="ws-federation/samples/Startup21.cs" id="snippet":::
118111

119-
[!INCLUDE [default settings configuration](social/includes/default-settings.md)]
120-
121112
:::moniker-end
122113

114+
[!INCLUDE [default settings configuration](social/includes/default-settings.md)]
115+
123116
### Log in with WS-Federation
124117

125118
Browse to the app and click the **Log in** link in the nav header. There's an option to log in with WsFederation:

0 commit comments

Comments
 (0)