We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User #244 service instead of current mock-up authorization.
File has a mock-up UserDb object that fetches data from internal dictionary instead of the database.
def __init__(self): self.users_db = UserDb() self.token2user = token2user def authorize(self, username, password): # username exists if not password: raise ValueError("Password empty") db_username_record = self.users_db.get_user(username) if not db_username_record: raise ValueError("Incorrect username or password") db_username = db_username_record['username'] db_password = db_username_record['password'] db_disabled = db_username_record["disabled"] if db_disabled: raise ValueError("This account was disabled") if db_username != username or db_password != password: raise ValueError("Incorrect username or password") return db_username_record
Replace this with service form #244
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Task
User #244 service instead of current mock-up authorization.
File has a mock-up UserDb object that fetches data from internal dictionary instead of the database.
Replace this with service form #244
The text was updated successfully, but these errors were encountered: