user/service.py
def grant_login(self, login, password):
        """Checks whether login and password match

        Args:
            login(string): user login
            password(string): password

        Returns:
            bool: Login granted
        """
        dummy_password = self.cryptoservice.generate_dummytoken()
        dummy_hash = self.cryptoservice.hash_password(dummy_password)
        user = self.repository.get_user_by_login(login)
        if not user:
            return self.cryptoservice.verify_password(password, dummy_hash)
        return self.cryptoservice.verify_password(password, user.password)
Checks whether login and password match

        Args:
            login(string): user login
            password(string): password

        Returns:
            bool: Login granted
        
Checks whether login and password match
Checks whether login and password match
def grant_login(self, login, password):
        dummy_password = self.cryptoservice.generate_dummytoken()
        dummy_hash = self.cryptoservice.hash_password(dummy_password)
        user = self.repository.get_user_by_login(login)
        if not user:
            return self.cryptoservice.verify_password(password, dummy_hash)
        return self.cryptoservice.verify_password(password, user.password)
def grant_login ( self , login , password ) : dummy_password = self . cryptoservice . generate_dummytoken ( ) dummy_hash = self . cryptoservice . hash_password ( dummy_password ) user = self . repository . get_user_by_login ( login ) if not user : return self . cryptoservice . verify_password ( password , dummy_hash ) return self . cryptoservice . verify_password ( password , user . password )
Checks whether login and password match
Checks whether login and password match
"""Checks whether login and password match

        Args:
            login(string): user login
            password(string): password

        Returns:
            bool: Login granted
        """
None
bool
self
login
None
password
None