Authentication_test corrections
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@@ -68,10 +68,13 @@ def testPersistency():
 | 
				
			|||||||
    logging.info('PERSISTENCY TEST')
 | 
					    logging.info('PERSISTENCY TEST')
 | 
				
			||||||
    auth = Authetication()
 | 
					    auth = Authetication()
 | 
				
			||||||
    auth.initConfig()
 | 
					    auth.initConfig()
 | 
				
			||||||
 | 
					    serverPublicKey = init.generatePrivateKeyForServer(auth, 'admin')
 | 
				
			||||||
    auth.saveUser('alma','alma')
 | 
					    auth.saveUser('alma','alma')
 | 
				
			||||||
    init.generatePrivateKeyForUser(auth, 'alma', 'amla')
 | 
					    homeDir = auth.login('alma','alma')
 | 
				
			||||||
 | 
					    init.generatePrivateKeyForUser(auth, 'alma', 'amla', serverPublicKey, init.generateSourceAddress(homeDir))
 | 
				
			||||||
    auth.saveUser('citrom','citrom')
 | 
					    auth.saveUser('citrom','citrom')
 | 
				
			||||||
    init.generatePrivateKeyForUser(auth, 'citrom', 'mortic')
 | 
					    homeDir = auth.login('citrom','citrom')
 | 
				
			||||||
 | 
					    init.generatePrivateKeyForUser(auth, 'citrom', 'mortic', serverPublicKey, init.generateSourceAddress(homeDir))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    auth2 = Authetication()
 | 
					    auth2 = Authetication()
 | 
				
			||||||
    if auth2.checkUserExists('alma'):
 | 
					    if auth2.checkUserExists('alma'):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,6 @@ from Crypto.PublicKey import RSA
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from authentication import Authetication
 | 
					from authentication import Authetication
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
def generatePrivateKeyForUser(auth: Authetication,username: str, user_passphrase: str, public_server_key: str,address: str) -> bool:
 | 
					def generatePrivateKeyForUser(auth: Authetication,username: str, user_passphrase: str, public_server_key: str,address: str) -> bool:
 | 
				
			||||||
    if auth.checkUserExists(username):
 | 
					    if auth.checkUserExists(username):
 | 
				
			||||||
        with open(auth.CONFIG_FILE_LOCATION) as json_file:
 | 
					        with open(auth.CONFIG_FILE_LOCATION) as json_file:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user