Skip to content

Commit dc53cd0

Browse files
author
John Luo
authored
Update RazorPages, MVC, WebApi templates to use Identity.Web (#24167)
* Update RazorPages, MVC, WebApi templates to use Identity.Web - Obsolete AAD v1 APIs
1 parent eb8764e commit dc53cd0

File tree

150 files changed

+1135
-38723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+1135
-38723
lines changed

AspNetCore.sln

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Authen
263263
EndProject
264264
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test", "src\Azure\AzureAD\Authentication.AzureADB2C.UI\test\Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj", "{27DF3ACF-F3ED-4D76-BFCB-57251892ABC0}"
265265
EndProject
266-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{583308EC-AF1F-4D92-A94B-BDE94EA842D3}"
267-
EndProject
268-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureADB2CSample", "src\Azure\AzureAD\samples\AzureADB2CSample\AzureADB2CSample.csproj", "{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}"
269-
EndProject
270266
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{16653D2A-AC79-44ED-B908-2EEB58684C50}"
271267
EndProject
272268
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests", "src\Azure\AzureAD\test\FunctionalTests\Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj", "{B70B1843-4360-4731-9D5C-599189CC1198}"
@@ -341,8 +337,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{03CD847C-2
341337
EndProject
342338
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Authentication", "src\Security\Authentication\Core\src\Microsoft.AspNetCore.Authentication.csproj", "{D47B73A3-740E-4B9A-B123-A42299F1F266}"
343339
EndProject
344-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureADSample", "src\Azure\AzureAD\samples\AzureADSample\AzureADSample.csproj", "{137E2185-A592-4E4D-B144-3A35418E3C4A}"
345-
EndProject
346340
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cookies", "Cookies", "{14A4E3F5-04BB-4062-84AE-1A887C307B17}"
347341
EndProject
348342
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Authentication.Cookies", "src\Security\Authentication\Cookies\src\Microsoft.AspNetCore.Authentication.Cookies.csproj", "{6906D7DE-CE06-4A6A-81BB-D783C605A184}"
@@ -2157,18 +2151,6 @@ Global
21572151
{27DF3ACF-F3ED-4D76-BFCB-57251892ABC0}.Release|x64.Build.0 = Release|Any CPU
21582152
{27DF3ACF-F3ED-4D76-BFCB-57251892ABC0}.Release|x86.ActiveCfg = Release|Any CPU
21592153
{27DF3ACF-F3ED-4D76-BFCB-57251892ABC0}.Release|x86.Build.0 = Release|Any CPU
2160-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2161-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Debug|Any CPU.Build.0 = Debug|Any CPU
2162-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Debug|x64.ActiveCfg = Debug|Any CPU
2163-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Debug|x64.Build.0 = Debug|Any CPU
2164-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Debug|x86.ActiveCfg = Debug|Any CPU
2165-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Debug|x86.Build.0 = Debug|Any CPU
2166-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Release|Any CPU.ActiveCfg = Release|Any CPU
2167-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Release|Any CPU.Build.0 = Release|Any CPU
2168-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Release|x64.ActiveCfg = Release|Any CPU
2169-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Release|x64.Build.0 = Release|Any CPU
2170-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Release|x86.ActiveCfg = Release|Any CPU
2171-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F}.Release|x86.Build.0 = Release|Any CPU
21722154
{B70B1843-4360-4731-9D5C-599189CC1198}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21732155
{B70B1843-4360-4731-9D5C-599189CC1198}.Debug|Any CPU.Build.0 = Debug|Any CPU
21742156
{B70B1843-4360-4731-9D5C-599189CC1198}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -2385,18 +2367,6 @@ Global
23852367
{D47B73A3-740E-4B9A-B123-A42299F1F266}.Release|x64.Build.0 = Release|Any CPU
23862368
{D47B73A3-740E-4B9A-B123-A42299F1F266}.Release|x86.ActiveCfg = Release|Any CPU
23872369
{D47B73A3-740E-4B9A-B123-A42299F1F266}.Release|x86.Build.0 = Release|Any CPU
2388-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2389-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
2390-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Debug|x64.ActiveCfg = Debug|Any CPU
2391-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Debug|x64.Build.0 = Debug|Any CPU
2392-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Debug|x86.ActiveCfg = Debug|Any CPU
2393-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Debug|x86.Build.0 = Debug|Any CPU
2394-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
2395-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Release|Any CPU.Build.0 = Release|Any CPU
2396-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Release|x64.ActiveCfg = Release|Any CPU
2397-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Release|x64.Build.0 = Release|Any CPU
2398-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Release|x86.ActiveCfg = Release|Any CPU
2399-
{137E2185-A592-4E4D-B144-3A35418E3C4A}.Release|x86.Build.0 = Release|Any CPU
24002370
{6906D7DE-CE06-4A6A-81BB-D783C605A184}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24012371
{6906D7DE-CE06-4A6A-81BB-D783C605A184}.Debug|Any CPU.Build.0 = Debug|Any CPU
24022372
{6906D7DE-CE06-4A6A-81BB-D783C605A184}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -7006,8 +6976,6 @@ Global
70066976
{B95A22C8-71B7-49DE-94B2-16402A36B914} = {2757D342-5E89-4C4B-9659-714AC8536FD4}
70076977
{600BF48B-F5DF-4C9D-A5A7-635A8DD6C32A} = {B95A22C8-71B7-49DE-94B2-16402A36B914}
70086978
{27DF3ACF-F3ED-4D76-BFCB-57251892ABC0} = {B95A22C8-71B7-49DE-94B2-16402A36B914}
7009-
{583308EC-AF1F-4D92-A94B-BDE94EA842D3} = {2757D342-5E89-4C4B-9659-714AC8536FD4}
7010-
{F6030571-6F10-442C-BAA9-CFFDAAA5D00F} = {583308EC-AF1F-4D92-A94B-BDE94EA842D3}
70116979
{16653D2A-AC79-44ED-B908-2EEB58684C50} = {2757D342-5E89-4C4B-9659-714AC8536FD4}
70126980
{B70B1843-4360-4731-9D5C-599189CC1198} = {16653D2A-AC79-44ED-B908-2EEB58684C50}
70136981
{4FDDC525-4E60-4CAF-83A3-261C5B43721F} = {0ACCEDA7-339C-4B4D-8DD4-1AC271F31C04}
@@ -7045,7 +7013,6 @@ Global
70457013
{EE23169F-C3A7-4A03-8FB7-C1F1B76301A9} = {9121A7EA-5751-4811-9FE3-E183BB8709FB}
70467014
{03CD847C-2230-4092-BF1C-DE54634805AD} = {822D1519-77F0-484A-B9AB-F694C2CC25F1}
70477015
{D47B73A3-740E-4B9A-B123-A42299F1F266} = {03CD847C-2230-4092-BF1C-DE54634805AD}
7048-
{137E2185-A592-4E4D-B144-3A35418E3C4A} = {583308EC-AF1F-4D92-A94B-BDE94EA842D3}
70497016
{14A4E3F5-04BB-4062-84AE-1A887C307B17} = {822D1519-77F0-484A-B9AB-F694C2CC25F1}
70507017
{6906D7DE-CE06-4A6A-81BB-D783C605A184} = {14A4E3F5-04BB-4062-84AE-1A887C307B17}
70517018
{2AB4FE8F-94FF-4C6E-B12F-9E40A9FAF9AB} = {822D1519-77F0-484A-B9AB-F694C2CC25F1}

eng/Dependencies.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ and are generated based on the last package release.
159159
<LatestPackageReference Include="Libuv" />
160160
<LatestPackageReference Include="MessagePack" />
161161
<LatestPackageReference Include="MessagePackAnalyzer" />
162+
<LatestPackageReference Include="Microsoft.Identity.Web.UI" />
163+
<LatestPackageReference Include="Microsoft.Graph" />
162164
<LatestPackageReference Include="Mono.Cecil" />
163165
<LatestPackageReference Include="Moq" />
164166
<LatestPackageReference Include="Newtonsoft.Json.Bson" />

eng/Versions.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@
247247
<IdentityServer4StoragePackageVersion>3.0.0</IdentityServer4StoragePackageVersion>
248248
<IdentityServer4EntityFrameworkStoragePackageVersion>3.0.0</IdentityServer4EntityFrameworkStoragePackageVersion>
249249
<MessagePackPackageVersion>2.1.90</MessagePackPackageVersion>
250+
<MicrosoftIdentityWebPackageVersion>0.2.0-preview</MicrosoftIdentityWebPackageVersion>
251+
<MicrosoftIdentityWebUIPackageVersion>0.2.0-preview</MicrosoftIdentityWebUIPackageVersion>
252+
<MicrosoftGraphPackageVersion>3.8.0</MicrosoftGraphPackageVersion>
250253
<MessagePackAnalyzerPackageVersion>$(MessagePackPackageVersion)</MessagePackAnalyzerPackageVersion>
251254
<MoqPackageVersion>4.10.0</MoqPackageVersion>
252255
<MonoCecilPackageVersion>0.11.2</MonoCecilPackageVersion>

src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Controllers/AccountController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using Microsoft.AspNetCore.Authorization;
56
using Microsoft.AspNetCore.Mvc;
67
using Microsoft.Extensions.Options;
@@ -11,6 +12,7 @@ namespace Microsoft.AspNetCore.Authentication.AzureAD.UI.AzureAD.Controllers.Int
1112
[AllowAnonymous]
1213
[Area("AzureAD")]
1314
[Route("[area]/[controller]/[action]")]
15+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1416
internal class AccountController : Controller
1517
{
1618
public AccountController(IOptionsMonitor<AzureADOptions> options)

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAccountControllerFeatureProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using System.Collections.Generic;
56
using System.Reflection;
67
using Microsoft.AspNetCore.Authentication.AzureAD.UI.AzureAD.Controllers.Internal;
@@ -9,6 +10,7 @@
910

1011
namespace Microsoft.AspNetCore.Authentication.AzureAD.UI
1112
{
13+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1214
internal class AzureADAccountControllerFeatureProvider : IApplicationFeatureProvider<ControllerFeature>, IApplicationFeatureProvider
1315
{
1416
public void PopulateFeature(IEnumerable<ApplicationPart> parts, ControllerFeature feature)

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAuthenticationBuilderExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ namespace Microsoft.AspNetCore.Authentication
1818
/// <summary>
1919
/// Extension methods to add Azure Active Directory Authentication to your application.
2020
/// </summary>
21+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
2122
public static class AzureADAuthenticationBuilderExtensions
2223
{
2324
/// <summary>
@@ -28,6 +29,7 @@ public static class AzureADAuthenticationBuilderExtensions
2829
/// <see cref="AzureADOptions"/>.
2930
/// </param>
3031
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
32+
[Obsolete("This is obsolete and will be removed in a future version. Use AddMicrosoftWebApiAuthentication from Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
3133
public static AuthenticationBuilder AddAzureADBearer(this AuthenticationBuilder builder, Action<AzureADOptions> configureOptions) =>
3234
builder.AddAzureADBearer(
3335
AzureADDefaults.BearerAuthenticationScheme,
@@ -44,6 +46,7 @@ public static AuthenticationBuilder AddAzureADBearer(this AuthenticationBuilder
4446
/// <see cref="AzureADOptions"/>.
4547
/// </param>
4648
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
49+
[Obsolete("This is obsolete and will be removed in a future version. Use AddMicrosoftWebApiAuthentication from Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
4750
public static AuthenticationBuilder AddAzureADBearer(
4851
this AuthenticationBuilder builder,
4952
string scheme,
@@ -78,6 +81,7 @@ public static AuthenticationBuilder AddAzureADBearer(
7881
/// <see cref="AzureADOptions"/>
7982
/// </param>
8083
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
84+
[Obsolete("This is obsolete and will be removed in a future version. Use AddMicrosoftWebApiAuthentication from Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
8185
public static AuthenticationBuilder AddAzureAD(this AuthenticationBuilder builder, Action<AzureADOptions> configureOptions) =>
8286
builder.AddAzureAD(
8387
AzureADDefaults.AuthenticationScheme,
@@ -98,6 +102,7 @@ public static AuthenticationBuilder AddAzureAD(this AuthenticationBuilder builde
98102
/// <see cref="AzureADOptions"/>
99103
/// </param>
100104
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
105+
[Obsolete("This is obsolete and will be removed in a future version. Use AddMicrosoftWebApiAuthentication from Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
101106
public static AuthenticationBuilder AddAzureAD(
102107
this AuthenticationBuilder builder,
103108
string scheme,

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADCookieOptionsConfiguration.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using Microsoft.AspNetCore.Authentication.Cookies;
56
using Microsoft.AspNetCore.Http;
67
using Microsoft.Extensions.Options;
78

89
namespace Microsoft.AspNetCore.Authentication.AzureAD.UI
910
{
11+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1012
internal class AzureADCookieOptionsConfiguration : IConfigureNamedOptions<CookieAuthenticationOptions>
1113
{
1214
private readonly IOptions<AzureADSchemeOptions> _schemeOptions;
@@ -25,7 +27,7 @@ public void Configure(string name, CookieAuthenticationOptions options)
2527
{
2628
return;
2729
}
28-
30+
2931
var AzureADOptions = _AzureADOptions.Get(AzureADScheme);
3032
if (name != AzureADOptions.CookieSchemeName)
3133
{

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADDefaults.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45

56
namespace Microsoft.AspNetCore.Authentication.AzureAD.UI
67
{
78
/// <summary>
89
/// Constants for different Azure Active Directory authentication components.
910
/// </summary>
11+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1012
public static class AzureADDefaults
11-
{
13+
{
1214
/// <summary>
1315
/// The scheme name for Open ID Connect when using
1416
/// <see cref="AzureADAuthenticationBuilderExtensions.AddAzureAD(AuthenticationBuilder, System.Action{AzureADOptions})"/>.

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADJwtBearerOptionsConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace Microsoft.AspNetCore.Authentication
1010
{
11+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1112
internal class AzureADJwtBearerOptionsConfiguration : IConfigureNamedOptions<JwtBearerOptions>
1213
{
1314
private readonly IOptions<AzureADSchemeOptions> _schemeOptions;

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOpenIdConnectOptionsConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Microsoft.AspNetCore.Authentication.AzureAD.UI
99
{
10+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1011
internal class AzureADOpenIdConnectOptionsConfiguration : IConfigureNamedOptions<OpenIdConnectOptions>
1112
{
1213
private readonly IOptions<AzureADSchemeOptions> _schemeOptions;

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOptions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using Microsoft.AspNetCore.Authentication.Cookies;
56
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
67

@@ -9,6 +10,7 @@ namespace Microsoft.AspNetCore.Authentication.AzureAD.UI
910
/// <summary>
1011
/// Options for configuring authentication using Azure Active Directory.
1112
/// </summary>
13+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1214
public class AzureADOptions
1315
{
1416
/// <summary>

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOptionsConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using Microsoft.Extensions.Options;
56

67
namespace Microsoft.AspNetCore.Authentication.AzureAD.UI
78
{
9+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
810
internal class AzureADOptionsConfiguration : IConfigureNamedOptions<AzureADOptions>
911
{
1012
private readonly IOptions<AzureADSchemeOptions> _schemeOptions;

src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOptionsValidation.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using Microsoft.Extensions.Options;
56

67
namespace Microsoft.AspNetCore.Authentication.AzureAD.UI
78
{
9+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
810
internal class AzureADOptionsValidation : IValidateOptions<AzureADOptions>
911
{
1012
public ValidateOptionsResult Validate(string name, AzureADOptions options)

src/Azure/AzureAD/Authentication.AzureAD.UI/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<PropertyGroup>
44
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
55
<RootNamespace>Microsoft.AspNetCore.Authentication.AzureAD.UI</RootNamespace>
6+
<!-- This package will be deprecated -->
7+
<NoWarn>$(NoWarn);CS0618</NoWarn>
68
</PropertyGroup>
79

810
<ItemGroup>

src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Controllers/AccountController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using System.Threading.Tasks;
56
using Microsoft.AspNetCore.Authentication;
67
using Microsoft.AspNetCore.Authorization;
@@ -13,6 +14,7 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI.AzureADB2C.Controlle
1314
[AllowAnonymous]
1415
[Area("AzureADB2C")]
1516
[Route("[area]/[controller]/[action]")]
17+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1618
internal class AccountController : Controller
1719
{
1820
private readonly IOptionsMonitor<AzureADB2COptions> _options;

src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureADB2CAccountControllerFeatureProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using System.Collections.Generic;
56
using System.Reflection;
67
using Microsoft.AspNetCore.Authentication.AzureADB2C.UI.AzureADB2C.Controllers.Internal;
@@ -9,6 +10,7 @@
910

1011
namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI
1112
{
13+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1214
internal class AzureADB2CAccountControllerFeatureProvider : IApplicationFeatureProvider<ControllerFeature>, IApplicationFeatureProvider
1315
{
1416
public void PopulateFeature(IEnumerable<ApplicationPart> parts, ControllerFeature feature)

src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureADB2CCookieOptionsConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
33

4+
using System;
45
using Microsoft.AspNetCore.Authentication.Cookies;
56
using Microsoft.AspNetCore.Http;
67
using Microsoft.Extensions.Options;
78

89
namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI
910
{
11+
[Obsolete("This is obsolete and will be removed in a future version. Use Microsoft.Identity.Web instead. See https://aka.ms/ms-identity-web.")]
1012
internal class AzureADB2CCookieOptionsConfiguration : IConfigureNamedOptions<CookieAuthenticationOptions>
1113
{
1214
private readonly IOptions<AzureADB2CSchemeOptions> _schemeOptions;

0 commit comments

Comments
 (0)