@@ -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
7981The 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
105125Browse 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
108129With 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
111133With 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
114137A successful sign-in for a new user redirects to the app's user registration page:
138+
115139![ Register page] ( ws-federation/_static/Register.png )
0 commit comments