Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/LoginViewModel.cs @ 13742

Last change on this file since 13742 was 13739, checked in by jlodewyc, 9 years ago

#2582 Overhaul Login service, done

File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel.DataAnnotations;
4using System.Linq;
5using System.Threading.Tasks;
6
7namespace HeuristicLab.Clients.Hive.WebJobManager.ViewModels
8{
9    /// <summary>
10    /// Used for login
11    /// </summary>
12    public class LoginViewModel
13    {
14        /// <summary>
15        /// Used only for the WebHive. Identifies logged in users.
16        /// </summary>
17        public Guid userId { get; set; }
18        /// <summary>
19        /// Login name from the user
20        /// </summary>
21        [Display(Name = "Username")]
22        public string loginName { get; set; }
23        /// <summary>
24        /// Encrypted password
25        /// </summary>
26        [Display(Name = "Password")]
27        public string password { get; set; }
28
29        public string errorMessage { get; set; }
30        /// <summary>
31        /// Initialize the loginViewModel. Creates a unique Guid for the WebHive
32        /// </summary>
33        /// <param name="n">Login name</param>
34        /// <param name="p">Encrypted password</param>
35        public LoginViewModel(string n, string p)
36        {
37            loginName = n;
38            password = p;
39            userId = Guid.NewGuid();
40        }
41        public LoginViewModel()
42        {
43            userId = Guid.Empty;
44            loginName = "";
45            password = "";
46        }
47    }
48}
Note: See TracBrowser for help on using the repository browser.