2018-03-26 19:27:29 +02:00
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2019-09-04 01:25:36 +01:00
|
|
|
|
using Yavsc.Attributes.Validation;
|
2018-03-26 19:27:29 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Yavsc.ViewModels.Account
|
|
|
|
|
|
{
|
2023-04-02 14:53:31 +01:00
|
|
|
|
// TODO external autentication providers
|
2023-04-05 22:29:40 +01:00
|
|
|
|
|
|
|
|
|
|
public class SignInModel
|
2018-03-26 19:27:29 +02:00
|
|
|
|
{
|
2023-04-05 22:29:40 +01:00
|
|
|
|
/// <summary>
|
2018-03-26 19:27:29 +02:00
|
|
|
|
/// Local user's name.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2026-02-09 01:03:33 +00:00
|
|
|
|
[Required]
|
|
|
|
|
|
public string UserName { get; set; }
|
2018-03-26 19:27:29 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Local user's password .
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2019-09-04 01:25:36 +01:00
|
|
|
|
[YaRequired]
|
2018-03-26 19:27:29 +02:00
|
|
|
|
[DataType(DataType.Password)]
|
|
|
|
|
|
public string Password { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// When true, asks for a two-factor identification
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[Display(Name = "Se souvenir de moi?")]
|
|
|
|
|
|
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>
|
|
|
|
|
|
public string ReturnUrl { get; set; }
|
|
|
|
|
|
|
2018-07-15 06:47:41 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class YaAuthenticationDescription {
|
|
|
|
|
|
public string DisplayName { get; set; }
|
|
|
|
|
|
public string AuthenticationScheme { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public IDictionary<string,object> Items { get; set; }
|
2018-03-26 19:27:29 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|