This repository has been archived by the owner on May 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/path/to/interpreter | ||
|
||
"""Helper Class""" | ||
|
||
|
||
class Helper: | ||
""" | ||
Helper Class. | ||
Contains helper methods for cars_app app | ||
""" | ||
|
||
@staticmethod | ||
def check_auth(username, password, user_list): | ||
""" | ||
check if the given is valid | ||
:param user_list: | ||
:param username: | ||
:param password: | ||
:return: | ||
""" | ||
|
||
user = [user for user in user_list if user['name'] | ||
== username and user['password'] == password] | ||
if len(user) == 1: | ||
return True | ||
return False |