Make GetChangeEmailTokenPurpose public (#17209)

This commit is contained in:
Hao Kung 2020-01-12 21:09:53 -08:00 committed by GitHub
parent d0c71edd84
commit 605c522fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 7 deletions

View File

@ -576,7 +576,7 @@ namespace Microsoft.AspNetCore.Identity
public virtual System.Threading.Tasks.Task<int> GetAccessFailedCountAsync(TUser user) { throw null; }
public virtual System.Threading.Tasks.Task<string> GetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) { throw null; }
public virtual System.Threading.Tasks.Task<string> 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<System.Collections.Generic.IList<System.Security.Claims.Claim>> GetClaimsAsync(TUser user) { throw null; }
[System.Diagnostics.DebuggerStepThroughAttribute]

View File

@ -576,7 +576,7 @@ namespace Microsoft.AspNetCore.Identity
public virtual System.Threading.Tasks.Task<int> GetAccessFailedCountAsync(TUser user) { throw null; }
public virtual System.Threading.Tasks.Task<string> GetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) { throw null; }
public virtual System.Threading.Tasks.Task<string> 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<System.Collections.Generic.IList<System.Security.Claims.Claim>> GetClaimsAsync(TUser user) { throw null; }
[System.Diagnostics.DebuggerStepThroughAttribute]

View File

@ -2469,16 +2469,12 @@ namespace Microsoft.AspNetCore.Identity
return cast;
}
/// <summary>
/// Generates the token purpose used to change email.
/// </summary>
/// <param name="newEmail">The new email address.</param>
/// <returns>The token purpose.</returns>
protected static string GetChangeEmailTokenPurpose(string newEmail)
{
return "ChangeEmail:" + newEmail;
}
public static string GetChangeEmailTokenPurpose(string newEmail) => "ChangeEmail:" + newEmail;
/// <summary>
/// Should return <see cref="IdentityResult.Success"/> if validation is successful. This is