Skip to content

Commit 7af34ab

Browse files
authored
Obsolete ResponseMode in MicrosoftChallengeProperties (#26938)
* Obsolete ResponseMode in MicrosoftChallengeProperties * Suppress CS0618 * Suppress CS0618
1 parent 8a81194 commit 7af34ab

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/Security/Authentication/MicrosoftAccount/src/MicrosoftAccountHandler.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ protected override string BuildChallengeUrl(AuthenticationProperties properties,
5454
};
5555

5656
AddQueryString(queryStrings, properties, MicrosoftChallengeProperties.ScopeKey, FormatScope, Options.Scope);
57+
#pragma warning disable CS0618 // Type or member is obsolete
5758
AddQueryString(queryStrings, properties, MicrosoftChallengeProperties.ResponseModeKey);
59+
#pragma warning restore CS0618 // Type or member is obsolete
5860
AddQueryString(queryStrings, properties, MicrosoftChallengeProperties.DomainHintKey);
5961
AddQueryString(queryStrings, properties, MicrosoftChallengeProperties.LoginHintKey);
6062
AddQueryString(queryStrings, properties, MicrosoftChallengeProperties.PromptKey);

src/Security/Authentication/MicrosoftAccount/src/MicrosoftChallengeProperties.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections.Generic;
23
using Microsoft.AspNetCore.Authentication.OAuth;
34

@@ -11,6 +12,7 @@ public class MicrosoftChallengeProperties : OAuthChallengeProperties
1112
/// <summary>
1213
/// The parameter key for the "response_mode" argument being used for a challenge request.
1314
/// </summary>
15+
[Obsolete("This parameter is not supported in MicrosoftAccountHandler.")]
1416
public static readonly string ResponseModeKey = "response_mode";
1517

1618
/// <summary>
@@ -42,6 +44,7 @@ public MicrosoftChallengeProperties(IDictionary<string, string> items, IDictiona
4244
/// <summary>
4345
/// The "response_mode" parameter value being used for a challenge request.
4446
/// </summary>
47+
[Obsolete("This parameter is not supported in MicrosoftAccountHandler.")]
4548
public string ResponseMode
4649
{
4750
get => GetParameter<string>(ResponseModeKey);

src/Security/Authentication/test/MicrosoftAccountTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ private static async Task<IHost> CreateHost(Action<MicrosoftAccountOptions> conf
374374
Prompt = "select_account",
375375
LoginHint = "username",
376376
DomainHint = "consumers",
377+
#pragma warning disable CS0618 // Type or member is obsolete
377378
ResponseMode = "query",
379+
#pragma warning restore CS0618 // Type or member is obsolete
378380
RedirectUri = "/me"
379381
});
380382
}

0 commit comments

Comments
 (0)