def check_digest_auth(user, passwd):
 if request.headers.get('Authorization'):
  credentails = parse_authorization_header(request.headers.get('Authorization'))
  if (not credentails):
   return
  response_hash = response(credentails, passwd, dict(uri=(request.script_root + request.path), body=request.data, method=request.method))
  if (credentails.get('response') == response_hash):
   return True
 return False

def check_digest_auth ( user , passwd ) : if request . headers . get ( 'Authorization' ) : credentails = parse_authorization_header ( request . headers . get ( 'Authorization' ) ) if ( not credentails ) : return response_hash = response ( credentails , passwd , dict ( uri = ( request . script_root + request . path ) , body = request . data , method = request . method ) ) if ( credentails . get ( 'response' ) == response_hash ) : return True return False
check user authentication using http digest auth .