summaryrefslogtreecommitdiffstats
path: root/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/AccountViewModels.cs
diff options
context:
space:
mode:
authorDavid Christiansen <coding@davedoes.net>2015-01-05 21:29:48 +0000
committerDavid Christiansen <coding@davedoes.net>2015-01-05 21:29:48 +0000
commit5fde84cfe2967d203c8bc183708394d95bb52c36 (patch)
treeb082a01743f2d20ce80dddcc4a99f88f0c49e1c4 /samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/AccountViewModels.cs
parentf840b593c345265ebcfd6c1cf5b57ab6d948f92c (diff)
downloadDotNetOpenAuth-5fde84cfe2967d203c8bc183708394d95bb52c36.zip
DotNetOpenAuth-5fde84cfe2967d203c8bc183708394d95bb52c36.tar.gz
DotNetOpenAuth-5fde84cfe2967d203c8bc183708394d95bb52c36.tar.bz2
Straight forward OpenID Connect RP example
Diffstat (limited to 'samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/AccountViewModels.cs')
-rw-r--r--samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/AccountViewModels.cs112
1 files changed, 112 insertions, 0 deletions
diff --git a/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/AccountViewModels.cs b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/AccountViewModels.cs
new file mode 100644
index 0000000..6f6a07a
--- /dev/null
+++ b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/AccountViewModels.cs
@@ -0,0 +1,112 @@
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+
+namespace DotNetOpenAuth.Samples.OpenIDConnectRP.Models
+{
+ public class ExternalLoginConfirmationViewModel
+ {
+ [Required]
+ [Display(Name = "Email")]
+ public string Email { get; set; }
+ }
+
+ public class ExternalLoginListViewModel
+ {
+ public string ReturnUrl { get; set; }
+ }
+
+ public class SendCodeViewModel
+ {
+ public string SelectedProvider { get; set; }
+ public ICollection<System.Web.Mvc.SelectListItem> Providers { get; set; }
+ public string ReturnUrl { get; set; }
+ public bool RememberMe { get; set; }
+ }
+
+ public class VerifyCodeViewModel
+ {
+ [Required]
+ public string Provider { get; set; }
+
+ [Required]
+ [Display(Name = "Code")]
+ public string Code { get; set; }
+ public string ReturnUrl { get; set; }
+
+ [Display(Name = "Remember this browser?")]
+ public bool RememberBrowser { get; set; }
+
+ public bool RememberMe { get; set; }
+ }
+
+ public class ForgotViewModel
+ {
+ [Required]
+ [Display(Name = "Email")]
+ public string Email { get; set; }
+ }
+
+ public class LoginViewModel
+ {
+ [Required]
+ [Display(Name = "Email")]
+ [EmailAddress]
+ public string Email { get; set; }
+
+ [Required]
+ [DataType(DataType.Password)]
+ [Display(Name = "Password")]
+ public string Password { get; set; }
+
+ [Display(Name = "Remember me?")]
+ public bool RememberMe { get; set; }
+ }
+
+ public class RegisterViewModel
+ {
+ [Required]
+ [EmailAddress]
+ [Display(Name = "Email")]
+ public string Email { get; set; }
+
+ [Required]
+ [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
+ [DataType(DataType.Password)]
+ [Display(Name = "Password")]
+ public string Password { get; set; }
+
+ [DataType(DataType.Password)]
+ [Display(Name = "Confirm password")]
+ [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
+ public string ConfirmPassword { get; set; }
+ }
+
+ public class ResetPasswordViewModel
+ {
+ [Required]
+ [EmailAddress]
+ [Display(Name = "Email")]
+ public string Email { get; set; }
+
+ [Required]
+ [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
+ [DataType(DataType.Password)]
+ [Display(Name = "Password")]
+ public string Password { get; set; }
+
+ [DataType(DataType.Password)]
+ [Display(Name = "Confirm password")]
+ [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
+ public string ConfirmPassword { get; set; }
+
+ public string Code { get; set; }
+ }
+
+ public class ForgotPasswordViewModel
+ {
+ [Required]
+ [EmailAddress]
+ [Display(Name = "Email")]
+ public string Email { get; set; }
+ }
+}