<s> """<STR_LIT>""" <EOL> from flask import Flask <EOL> from flask_httpauth import HTTPBasicAuth <EOL> from werkzeug . security import generate_password_hash , check_password_hash <EOL> app = Flask ( __name__ ) <EOL> auth = HTTPBasicAuth ( ) <EOL> users = { <EOL> "<STR_LIT>" : generate_password_hash ( "<STR_LIT:hello>" ) , <EOL> "<STR_LIT>" : generate_password_hash ( "<STR_LIT>" ) <EOL> } <EOL> @ auth . verify_password <EOL> def verify_password ( username , password ) : <EOL> if username in users : <EOL> return check_password_hash ( users . get ( username ) , password ) <EOL> return False <EOL> @ app . route ( '<STR_LIT:/>' ) <EOL> @ auth . login_required <EOL> def index ( ) : <EOL> return "<STR_LIT>" % auth . username ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> app . run ( ) </s>
