コード例 #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;
 }
コード例 #2
0
 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);
 }