minimalistic_scanner / AuthVerification.py
Glainez's picture
Update AuthVerification.py
befa452 verified
raw
history blame contribute delete
481 Bytes
import gradio as gr
import os
def get_accepted_username_passwords():
username__passwords = [os.environ.get(f'USER_{i}', None) for i in range(900) if os.environ.get(f'USER_{i}', False)]
return username__passwords
def auth_verification(username, password):
username__password = f'{username}__{password}'
username__passwords_accepted = get_accepted_username_passwords()
allowed = username__password in username__passwords_accepted
return allowed