yavsc/Yavsc/ViewModels/Account/LoginViewModel.cs

54 lines
1.7 KiB
C#
Raw Normal View History

2016-05-17 18:22:18 +02:00
2016-05-29 03:11:38 +02:00
using System.Collections.Generic;
2016-05-17 18:22:18 +02:00
using System.ComponentModel.DataAnnotations;
2016-05-29 03:11:38 +02:00
using Microsoft.AspNet.Http.Authentication;
2016-05-17 18:22:18 +02:00
namespace Yavsc.ViewModels.Account
{
public class SignInViewModel
2016-05-17 18:22:18 +02:00
{
/// <summary>
/// Local user's name.
/// </summary>
/// <returns></returns>
2016-05-17 18:22:18 +02:00
[Required]
public string UserName { get; set; }
/// <summary>
/// Local user's password .
/// </summary>
/// <returns></returns>
2016-05-17 18:22:18 +02:00
[Required]
[DataType(DataType.Password)]
public string Password { get; set; }
/// <summary>
/// When true, asks for a two-factor identification
/// </summary>
/// <returns></returns>
2016-05-17 18:22:18 +02:00
[Display(Name = "Remember me?")]
public bool RememberMe { get; set; }
/// <summary>
/// Indicates the authentication provider'name chosen to authenticate,
/// contains "LOCAL" to choose the local application identity
/// and user password credentials.
/// </summary>
/// <returns></returns>
public string Provider { get; set; }
/// <summary>
/// This value does NOT indicate the OAuth client method recieving the code,
/// but the one called once authorized.
/// </summary>
/// <returns></returns>
2016-05-29 03:11:38 +02:00
public string ReturnUrl { get; set; }
/// <summary>
/// Lists external identity provider descriptions.
/// </summary>
/// <returns>an enumeration of the descriptions.</returns>
2016-05-29 03:11:38 +02:00
public IEnumerable<AuthenticationDescription> ExternalProviders { get; set; }
2016-05-17 18:22:18 +02:00
}
}