Esempio n. 1
0
 internal static bool RegisterUser(Credentials pCredentials)
 {
     string key = GetRandomString();
     if (SQLStatements.InsertNewUser(pCredentials.Email, pCredentials.Password, pCredentials.Username, key))
     {
         ComConMail.Mail mMail = new ComConMail.Mail();
         return mMail.SendRegistrationMail(pCredentials.Username, key, pCredentials.Email);
     }
     return false;
 }
 public User ConnectToServer(Credentials credentials)
 {
     IChatUser user = OperationContext.Current.GetCallbackChannel<IChatUser>();
     User m = LoginService.AuthenticateUser(credentials);
     if (m != null)
     {
         Users.Add(m);
         ConnectedUsers.Add(user);
     }
     SendServerMessage(m.Username + " hat den Server betreten");
     return m;
 }
Esempio n. 3
0
 public bool RegisterUser(Credentials pCredentials)
 {
     return LoginService.RegisterUser(pCredentials);
 }
Esempio n. 4
0
 public User Authenticate(Credentials pCredentials)
 {
     return LoginService.AuthenticateUser(pCredentials);
 }
Esempio n. 5
0
 public void Login(Credentials pCredentials)
 {
     throw new NotImplementedException();
 }
Esempio n. 6
0
 public async Task<Profile> LoginAsync(Credentials pCredentials)
 {
     return await (Api as ProfileAPI).SearchByMail(pCredentials.Email);
 }
Esempio n. 7
0
 public static User AuthenticateUser(Credentials pCredentials)
 {
     return SQLStatements.GetChatUser(pCredentials.Email, pCredentials.Password);
 }