#NEWLINE# def checkpassword_dict( user_password_dict ) : #NEWLINE# #INDENT# 'Returns a checkpassword function which checks credentials\n    against a dictionary of the form: {username : password}.\n\n    If you want a simple dictionary-based authentication scheme, use\n    checkpassword_dict(my_credentials_dict) as the value for the\n    checkpassword argument to basic_auth().\n    ' #NEWLINE# def checkpassword( realm , user , password ) : #NEWLINE# #INDENT# p = user_password_dict . get ( user ) #NEWLINE# return ( ( p and ( p == password ) ) or False ) #NEWLINE# #UNINDENT# return checkpassword