login
This commit is contained in:
parent
5cf4bd48e8
commit
181a44e396
7 changed files with 198 additions and 82 deletions
65
src/Server/ViewModels/Account/SignInModel.cs
Executable file
65
src/Server/ViewModels/Account/SignInModel.cs
Executable file
|
|
@ -0,0 +1,65 @@
|
|||
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// Local user's name.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required]
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Local user's password .
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required]
|
||||
[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; }
|
||||
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<string, object> Items { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue