2013-10-17 11:28:21 +11:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
using System.Runtime.Serialization;
|
2013-10-10 20:56:30 +11:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Web.Models.ContentEditing
|
|
|
|
|
|
{
|
2013-10-17 11:28:21 +11:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A model representing an attempt at changing a password
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class PasswordChangedModel
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The error affiliated with the failing password changes, null if changing was successful
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ValidationResult ChangeError { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// If the password was reset, this is the value it has been changed to
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ResetPassword { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-10-10 20:56:30 +11:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A model representing the data required to set a member/user password depending on the provider installed.
|
|
|
|
|
|
/// </summary>
|
2013-10-17 11:28:21 +11:00
|
|
|
|
public class ChangingPasswordModel
|
2013-10-10 20:56:30 +11:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The password value
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// This
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
[DataMember(Name = "newPassword")]
|
|
|
|
|
|
public string NewPassword { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The old password - used to change a password when: EnablePasswordRetrieval = false
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "oldPassword")]
|
|
|
|
|
|
public string OldPassword { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Set to true if the password is to be reset - only valid when: EnablePasswordReset = true
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "reset")]
|
|
|
|
|
|
public bool? Reset { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The password answer - required for reset when: RequiresQuestionAndAnswer = true
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "answer")]
|
|
|
|
|
|
public string Answer { get; set; }
|
2013-10-11 12:25:10 +11:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// This is filled in on the server side if the password has been reset/generated
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataMember(Name = "generatedPassword")]
|
|
|
|
|
|
public string GeneratedPassword { get; set; }
|
2013-10-10 20:56:30 +11:00
|
|
|
|
}
|
|
|
|
|
|
}
|