using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Runtime.InteropServices; using Yavsc.Attributes.Validation; namespace Yavsc.ViewModels.Account { // TODO external autentication providers public class SignInModel { /// /// Local user's name. /// /// [Required] public string UserName { get; set; } /// /// Local user's password . /// /// [Required] [DataType(DataType.Password)] public string Password { get; set; } /// /// When true, asks for a two-factor identification /// /// [Display(Name = "Se souvenir de moi?")] public bool RememberMe { get; set; } /// /// Indicates the authentication provider'name chosen to authenticate, /// contains "LOCAL" to choose the local application identity /// and user password credentials. /// /// public string? Provider { get; set; } /// /// This value does NOT indicate the OAuth client method recieving the code, /// but the one called once authorized. /// /// public string? ReturnUrl { get; set; } public bool EnableLocalLogin { get; set; } public ExternalProvider[]? ExternalProviders { get; set; } public bool IsExternalLoginOnly { get; set; } public String? ExternalLoginScheme { get; set; } public bool AllowRememberLogin { get; set; } } public class YaAuthenticationDescription { public string DisplayName { get; set; } public string AuthenticationScheme { get; set; } public IDictionary Items { get; set; } } }