def check_basic_auth(user, passwd):
 auth = request.authorization
 return (auth and (auth.username == user) and (auth.password == passwd))

def check_basic_auth ( user , passwd ) : auth = request . authorization return ( auth and ( auth . username == user ) and ( auth . password == passwd ) )
checks user authentication using http basic auth .