using System.Runtime.Serialization;
namespace Umbraco.Web.Models
{
///
/// A model representing the data required to set a member/user password depending on the provider installed.
///
public class ChangingPasswordModel
{
///
/// The password value
///
[DataMember(Name = "newPassword")]
public string NewPassword { get; set; }
///
/// The old password - used to change a password when: EnablePasswordRetrieval = false
///
[DataMember(Name = "oldPassword")]
public string OldPassword { get; set; }
///
/// Set to true if the password is to be reset
///
///
///
/// This operator is different between using ASP.NET Identity APIs and Membership APIs.
///
///
/// When using Membership APIs, this is only valid when: EnablePasswordReset = true and it will reset the password to something auto generated.
///
///
/// When using ASP.NET Identity APIs this needs to be set if an administrator user that has access to the Users section is changing another users
/// password. This flag is required to indicate that the oldPassword value is not required and that we are in fact performing a password reset and
/// then a password change if the executing user has access to do so.
///
///
[DataMember(Name = "reset")]
public bool? Reset { get; set; }
///
/// The password answer - required for reset when: RequiresQuestionAndAnswer = true
///
[DataMember(Name = "answer")]
public string Answer { get; set; }
///
/// This is filled in on the server side if the password has been reset/generated
///
[DataMember(Name = "generatedPassword")]
public string GeneratedPassword { get; set; }
}
}