2022-11-19 16:06:23 -08:00
|
|
|
import logging
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
2022-11-19 17:23:47 -08:00
|
|
|
def is_authenticated(username: str, password: str) -> bool:
|
|
|
|
"""
|
|
|
|
Returns True if the supplied username/password matches the environment.
|
|
|
|
"""
|
2022-11-19 16:06:23 -08:00
|
|
|
logging.debug(f"Authentication attempt for {username}, {password}")
|
|
|
|
return (username == os.environ.get('USERNAME') and password == os.environ.get('PASSWORD'))
|