From 605c522fa3e875fd6d3aefa783a71d1745b7e4c7 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Sun, 12 Jan 2020 21:09:53 -0800 Subject: [PATCH] Make GetChangeEmailTokenPurpose public (#17209) --- .../ref/Microsoft.Extensions.Identity.Core.netcoreapp.cs | 2 +- .../Microsoft.Extensions.Identity.Core.netstandard2.0.cs | 2 +- src/Identity/Extensions.Core/src/UserManager.cs | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netcoreapp.cs b/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netcoreapp.cs index bbef8ce4cc..13979d60ae 100644 --- a/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netcoreapp.cs +++ b/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netcoreapp.cs @@ -576,7 +576,7 @@ namespace Microsoft.AspNetCore.Identity public virtual System.Threading.Tasks.Task GetAccessFailedCountAsync(TUser user) { throw null; } public virtual System.Threading.Tasks.Task GetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) { throw null; } public virtual System.Threading.Tasks.Task GetAuthenticatorKeyAsync(TUser user) { throw null; } - protected static string GetChangeEmailTokenPurpose(string newEmail) { throw null; } + public static string GetChangeEmailTokenPurpose(string newEmail) { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] public virtual System.Threading.Tasks.Task> GetClaimsAsync(TUser user) { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] diff --git a/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netstandard2.0.cs b/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netstandard2.0.cs index bbef8ce4cc..13979d60ae 100644 --- a/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netstandard2.0.cs +++ b/src/Identity/Extensions.Core/ref/Microsoft.Extensions.Identity.Core.netstandard2.0.cs @@ -576,7 +576,7 @@ namespace Microsoft.AspNetCore.Identity public virtual System.Threading.Tasks.Task GetAccessFailedCountAsync(TUser user) { throw null; } public virtual System.Threading.Tasks.Task GetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) { throw null; } public virtual System.Threading.Tasks.Task GetAuthenticatorKeyAsync(TUser user) { throw null; } - protected static string GetChangeEmailTokenPurpose(string newEmail) { throw null; } + public static string GetChangeEmailTokenPurpose(string newEmail) { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] public virtual System.Threading.Tasks.Task> GetClaimsAsync(TUser user) { throw null; } [System.Diagnostics.DebuggerStepThroughAttribute] diff --git a/src/Identity/Extensions.Core/src/UserManager.cs b/src/Identity/Extensions.Core/src/UserManager.cs index ddbf98f5df..fab5fd0d88 100644 --- a/src/Identity/Extensions.Core/src/UserManager.cs +++ b/src/Identity/Extensions.Core/src/UserManager.cs @@ -2469,16 +2469,12 @@ namespace Microsoft.AspNetCore.Identity return cast; } - /// /// Generates the token purpose used to change email. /// /// The new email address. /// The token purpose. - protected static string GetChangeEmailTokenPurpose(string newEmail) - { - return "ChangeEmail:" + newEmail; - } + public static string GetChangeEmailTokenPurpose(string newEmail) => "ChangeEmail:" + newEmail; /// /// Should return if validation is successful. This is