예제 #1
0
 public void BadPasswordAuthenticationTest()
 {
     FolderBackup.Server.Server serv = new FolderBackup.Server.Server();
     AuthenticationData ad = serv.authStep1("test1");
     token = ad.token;
     Assert.IsNotNull(ad);
     token = serv.authStep2(ad.token, "test1", AuthenticationPrimitives.hashPassword("asd", ad.salt, ad.token));
 }
예제 #2
0
 public void CorrectAuthenticationTest()
 {
     FolderBackup.Server.Server serv = new FolderBackup.Server.Server();
     AuthenticationData ad = serv.authStep1("test1");
     token = ad.token;
     Assert.IsNotNull(ad);
     token = serv.authStep2(ad.token, "test1", AuthenticationPrimitives.hashPassword("test1", ad.salt, ad.token));
     Assert.AreEqual(FolderBackup.Server.Server.getSessionByToken(token).user.rootDirectory.FullName, @"c:\folderBackup\test1\");
 }
예제 #3
0
        public void BadPasswordAuthenticationTest()
        {
            FolderBackup.Server.Server serv = new FolderBackup.Server.Server();
            AuthenticationData         ad   = serv.authStep1("test1");

            token = ad.token;
            Assert.IsNotNull(ad);
            token = serv.authStep2(ad.token, "test1", AuthenticationPrimitives.hashPassword("asd", ad.salt, ad.token));
        }
예제 #4
0
        public void CorrectAuthenticationTest()
        {
            FolderBackup.Server.Server serv = new FolderBackup.Server.Server();
            AuthenticationData         ad   = serv.authStep1("test1");

            token = ad.token;
            Assert.IsNotNull(ad);
            token = serv.authStep2(ad.token, "test1", AuthenticationPrimitives.hashPassword("test1", ad.salt, ad.token));
            Assert.AreEqual(serv.user.rootDirectory.FullName, @"c:\folderBackup\test1");
        }
예제 #5
0
 public void InvalidUserAuthenticationTest()
 {
     FolderBackup.Server.Server serv = new FolderBackup.Server.Server();
     AuthenticationData ad = serv.authStep1("test");
 }
예제 #6
0
 public void InvalidUserAuthenticationTest()
 {
     FolderBackup.Server.Server serv = new FolderBackup.Server.Server();
     AuthenticationData         ad   = serv.authStep1("test");
 }