summaryrefslogtreecommitdiffstats
path: root/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/ManageViewModels.cs
diff options
context:
space:
mode:
authorDavid Christiansen <DavidChristiansen@users.noreply.github.com>2015-01-05 21:31:54 +0000
committerDavid Christiansen <DavidChristiansen@users.noreply.github.com>2015-01-05 21:31:54 +0000
commitb0f5f21523526c863b9a61f64864109d96738c9b (patch)
treeb082a01743f2d20ce80dddcc4a99f88f0c49e1c4 /samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/ManageViewModels.cs
parentf840b593c345265ebcfd6c1cf5b57ab6d948f92c (diff)
parent5fde84cfe2967d203c8bc183708394d95bb52c36 (diff)
downloadDotNetOpenAuth-b0f5f21523526c863b9a61f64864109d96738c9b.zip
DotNetOpenAuth-b0f5f21523526c863b9a61f64864109d96738c9b.tar.gz
DotNetOpenAuth-b0f5f21523526c863b9a61f64864109d96738c9b.tar.bz2
Merge pull request #368 from DavidChristiansen/develop
Straight forward OpenID Connect RP example
Diffstat (limited to 'samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/ManageViewModels.cs')
-rw-r--r--samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/ManageViewModels.cs86
1 files changed, 86 insertions, 0 deletions
diff --git a/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/ManageViewModels.cs b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/ManageViewModels.cs
new file mode 100644
index 0000000..1128f0b
--- /dev/null
+++ b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Models/ManageViewModels.cs
@@ -0,0 +1,86 @@
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using Microsoft.AspNet.Identity;
+using Microsoft.Owin.Security;
+
+namespace DotNetOpenAuth.Samples.OpenIDConnectRP.Models
+{
+ public class IndexViewModel
+ {
+ public bool HasPassword { get; set; }
+ public IList<UserLoginInfo> Logins { get; set; }
+ public string PhoneNumber { get; set; }
+ public bool TwoFactor { get; set; }
+ public bool BrowserRemembered { get; set; }
+ }
+
+ public class ManageLoginsViewModel
+ {
+ public IList<UserLoginInfo> CurrentLogins { get; set; }
+ public IList<AuthenticationDescription> OtherLogins { get; set; }
+ }
+
+ public class FactorViewModel
+ {
+ public string Purpose { get; set; }
+ }
+
+ public class SetPasswordViewModel
+ {
+ [Required]
+ [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
+ [DataType(DataType.Password)]
+ [Display(Name = "New password")]
+ public string NewPassword { get; set; }
+
+ [DataType(DataType.Password)]
+ [Display(Name = "Confirm new password")]
+ [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
+ public string ConfirmPassword { get; set; }
+ }
+
+ public class ChangePasswordViewModel
+ {
+ [Required]
+ [DataType(DataType.Password)]
+ [Display(Name = "Current password")]
+ public string OldPassword { get; set; }
+
+ [Required]
+ [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
+ [DataType(DataType.Password)]
+ [Display(Name = "New password")]
+ public string NewPassword { get; set; }
+
+ [DataType(DataType.Password)]
+ [Display(Name = "Confirm new password")]
+ [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
+ public string ConfirmPassword { get; set; }
+ }
+
+ public class AddPhoneNumberViewModel
+ {
+ [Required]
+ [Phone]
+ [Display(Name = "Phone Number")]
+ public string Number { get; set; }
+ }
+
+ public class VerifyPhoneNumberViewModel
+ {
+ [Required]
+ [Display(Name = "Code")]
+ public string Code { get; set; }
+
+ [Required]
+ [Phone]
+ [Display(Name = "Phone Number")]
+ public string PhoneNumber { get; set; }
+ }
+
+ public class ConfigureTwoFactorViewModel
+ {
+ public string SelectedProvider { get; set; }
+ public ICollection<System.Web.Mvc.SelectListItem> Providers { get; set; }
+ }
+} \ No newline at end of file