-
Notifications
You must be signed in to change notification settings - Fork 9.8k
/
ResetPasswordRequest.cs
28 lines (23 loc) · 1.19 KB
/
ResetPasswordRequest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Routing;
namespace Microsoft.AspNetCore.Identity.Data;
/// <summary>
/// The response type for the "/resetPassword" endpoint added by <see cref="IdentityApiEndpointRouteBuilderExtensions.MapIdentityApi"/>.
/// The "/resetPassword" endpoint requires the "/forgotPassword" endpoint to be called first to get the <see cref="ResetCode"/>.
/// </summary>
public sealed class ResetPasswordRequest
{
/// <summary>
/// The email address for the user requesting a password reset. This should match <see cref="ForgotPasswordRequest.Email"/>.
/// </summary>
public required string Email { get; init; }
/// <summary>
/// The code sent to the user's email to reset the password. To get the reset code, first make a "/forgotPassword" request.
/// </summary>
public required string ResetCode { get; init; }
/// <summary>
/// The new password the user with the given <see cref="Email"/> should login with. This will replace the previous password.
/// </summary>
public required string NewPassword { get; init; }
}