using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
namespace Umbraco.Web.Models.ContentEditing
{
///
/// A model representing an attempt at changing a password
///
public class PasswordChangedModel
{
///
/// The error affiliated with the failing password changes, null if changing was successful
///
public ValidationResult ChangeError { get; set; }
///
/// If the password was reset, this is the value it has been changed to
///
public string ResetPassword { get; set; }
}
///
/// A model representing the data required to set a member/user password depending on the provider installed.
///
public class ChangingPasswordModel
{
///
/// The password value
///
///
/// This
///
[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 - only valid when: EnablePasswordReset = true
///
[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; }
}
}