示例#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;
 }
示例#3
0
 public bool RegisterUser(Credentials pCredentials)
 {
     return LoginService.RegisterUser(pCredentials);
 }
示例#4
0
 public User Authenticate(Credentials pCredentials)
 {
     return LoginService.AuthenticateUser(pCredentials);
 }
示例#5
0
 public void Login(Credentials pCredentials)
 {
     throw new NotImplementedException();
 }
示例#6
0
 public async Task<Profile> LoginAsync(Credentials pCredentials)
 {
     return await (Api as ProfileAPI).SearchByMail(pCredentials.Email);
 }
示例#7
0
 public static User AuthenticateUser(Credentials pCredentials)
 {
     return SQLStatements.GetChatUser(pCredentials.Email, pCredentials.Password);
 }