def _checkDigestResponse(auth_map, password, method='GET', A1=None, **kwargs):
 if (auth_map['realm'] != kwargs.get('realm', None)):
  return False
 response = _computeDigestResponse(auth_map, password, method, A1, **kwargs)
 return (response == auth_map['response'])

def _checkDigestResponse ( auth_map , password , method = 'GET' , A1 = None , ** kwargs ) : if ( auth_map [ 'realm' ] != kwargs . get ( 'realm' , None ) ) : return False response = _computeDigestResponse ( auth_map , password , method , A1 , ** kwargs ) return ( response == auth_map [ 'response' ] )
this function is used to verify the response given by the client when he tries to authenticate .