Login registration

This commit is contained in:
Paul Schneider
2024-11-23 14:23:47 +00:00
parent 009015ce3c
commit 0bcabbd4ff
22 changed files with 171 additions and 176 deletions

View File

@ -8,27 +8,28 @@ namespace Yavsc.ViewModels.Account
public class RegisterModel
{
[YaStringLength(2,Constants.MaxUserNameLength)]
[YaRegularExpression(Constants.UserNameRegExp)]
[StringLength(Constants.MaxUserNameLength)]
[RegularExpression(Constants.UserNameRegExp)]
[DataType(DataType.Text)]
[Display(Name = "UserName", Description = "User name")]
public string UserName { get; set; }
[YaRequired()]
[YaStringLength(2,102)]
[Required()]
[StringLength( maximumLength:102, MinimumLength = 5)]
// [EmailAddress]
[Display(Name = "Email")]
[Display(Name = "Email", Description = "E-Mail")]
public string Email { get; set; }
[YaStringLength(6,100)]
[StringLength(maximumLength:100, MinimumLength = 6,
ErrorMessage = "Le mot de passe doit contenir au moins 8 caratères")]
[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(Name = "Password")]
public string Password { get; set; }
[DataType(DataType.Password)]
[Compare("Password")]
[Display(Name = "ConfirmPassword", Description ="Password Confirmation")]
public string ConfirmPassword { get; set; }
}
}

View File

@ -19,23 +19,15 @@ namespace Yavsc
public const string CompanyClaimType = "https://schemas.pschneider.fr/identity/claims/Company";
public const string UserNameRegExp = @"^[a-zA-Z][a-zA-Z0-9._-]*$";
public const string UserFileNamePatternRegExp = @"^([a-zA-Z0-9._-]*/)*[a-zA-Z0-9._-]+$";
public const string AuthorizePath = "/authorize";
public const string TokenPath = "/token";
public const string LoginPath = "/signin";
public const string LogoutPath = "/signout";
public const string SignalRPath = "/api/signalr";
public const string UserFilesPath = "/files";
public const string AvatarsPath = "/avatars";
public const string GitPath = "/sources";
public const string LiveUserPath = "live";
public const string ApplicationAuthenticationSheme = "ServerCookie";
public const string ExternalAuthenticationSheme = "ExternalCookie";
public const string DefaultFactor = "Default";
public const string MobileAppFactor = "Mobile Application";
public const string EMailFactor = "Email";
public const string SMSFactor = "SMS";
public const string AdminGroupName = "Administrator";
public const string PerformerGroupName = "Performer";