EF7 npgsql => ko aux clients => inutile en lib [obsdnx]
This commit is contained in:
@ -1,20 +0,0 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Models.Account {
|
||||
public class ChangePasswordBindingModel {
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
public string OldPassword { get; set; }
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
public string NewPassword { get; set; }
|
||||
}
|
||||
public class SetPasswordBindingModel {
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class ExternalLoginConfirmationViewModel
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class ForgotPasswordViewModel
|
||||
{
|
||||
[Required]
|
||||
[StringLength(512)]
|
||||
public string LoginOrEmail { get; set; }
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNet.Http.Authentication;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class SignInViewModel
|
||||
{
|
||||
/// <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; }
|
||||
|
||||
/// <summary>
|
||||
/// Lists external identity provider descriptions.
|
||||
/// </summary>
|
||||
/// <returns>an enumeration of the descriptions.</returns>
|
||||
public IEnumerable<AuthenticationDescription> ExternalProviders { get; set; }
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
namespace Yavsc.Models.Auth
|
||||
{
|
||||
public class Me : IApplicationUser {
|
||||
public Me(ApplicationUser user)
|
||||
{
|
||||
Id = user.Id;
|
||||
UserName = user.UserName;
|
||||
EMail = user.Email;
|
||||
Avatar = user.Avatar;
|
||||
PostalAddress = user.PostalAddress;
|
||||
DedicatedGoogleCalendar = user.DedicatedGoogleCalendar;
|
||||
}
|
||||
public string Id { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string EMail { get; set; }
|
||||
public string[] Roles { get; set; }
|
||||
/// <summary>
|
||||
/// Known as profile, could point to an avatar
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Avatar { get; set; }
|
||||
|
||||
public IAccountBalance AccountBalance
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string DedicatedGoogleCalendar
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public ILocation PostalAddress
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class RegisterViewModel
|
||||
{
|
||||
// ErrorMessage = "",
|
||||
|
||||
|
||||
[Display(ResourceType = typeof(RegisterViewModel), Name = "UserName")]
|
||||
[StringLength(102)]
|
||||
[YaRegularExpression(@"[a-zA-Z0-9 .'_-]+", ErrorMessageResourceName="InvalidUserName", ErrorMessageResourceType = typeof(RegisterViewModel))]
|
||||
public string UserName { get; set; }
|
||||
|
||||
[YaRequired()]
|
||||
// [EmailAddress]
|
||||
[Display(Name = "Email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[StringLength(100, MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
|
||||
// ErrorMessage = "Les mots de passe doivent contenir au moins un caractère spécial, qui ne soit ni une lettre ni un chiffre.")]
|
||||
|
||||
[Display(ResourceType = typeof(RegisterViewModel), Name = "Password")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(ResourceType = typeof(RegisterViewModel), Name = "PasswordConfirm")]
|
||||
[Compare("Password", ErrorMessageResourceName = "PassAndConfirmDontMach", ErrorMessageResourceType = typeof(RegisterViewModel) )]
|
||||
public string ConfirmPassword { get; set; }
|
||||
|
||||
public string GoogleRegId { get; set; }
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class ResetPasswordViewModel
|
||||
{
|
||||
[Required]
|
||||
[EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "Le {0} doit être long d'au moins {2} caractères.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirmer le mot de passe")]
|
||||
[Compare("Password", ErrorMessage = "Le mot de passe et sa confirmation ne sont pas les mêmes.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class SendCodeViewModel
|
||||
{
|
||||
public string SelectedProvider { get; set; }
|
||||
|
||||
public ICollection<SelectListItem> Providers { get; set; }
|
||||
|
||||
public string ReturnUrl { get; set; }
|
||||
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class ShortUserInfo
|
||||
{
|
||||
public string Avatar { get; set; }
|
||||
|
||||
public string UserName { get; set; }
|
||||
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class UnregisterViewModel
|
||||
{
|
||||
public string ReturnUrl { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class VerifyCodeViewModel
|
||||
{
|
||||
[Required]
|
||||
public string Provider { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Code { get; set; }
|
||||
|
||||
public string ReturnUrl { get; set; }
|
||||
|
||||
[Display(Name = "Se souvenir de ce navigateur?")]
|
||||
public bool RememberBrowser { get; set; }
|
||||
|
||||
[Display(Name = "Se souvenir de moi?")]
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user