Login
Handles the backend for the login process.
login(first_name, last_name, attributes)
Login entry point.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
first_name |
str
|
First name entered by the user. |
required |
last_name |
str
|
Last name entered by the user. |
required |
attributes |
AppAttributes
|
The current app attributes. |
required |
Returns:
Type | Description |
---|---|
(str, AppState | None)
|
A string containing the user hash on success or an error message on errror and the current app state on success or None on error. |
Source code in evaluator/backend/login.py
_check_user_existence(user_hash, attributes)
Checks if the user already exists or not.
user_hash : str The user's md5 hash. attributes : AppAttributes The current app state.
Returns:
Type | Description |
---|---|
bool
|
True if the user exists, False otherwise. |
Source code in evaluator/backend/login.py
_generate_user_hash(first_name, last_name)
Generates the user's MD5 hash.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
first_name |
str
|
The user's first name. |
required |
last_name |
str
|
The user's last name. |
required |
Returns:
Type | Description |
---|---|
str
|
The user hash. |