def verify_hmac_sha1(request, client_secret=None, resource_owner_secret=None):
 norm_params = normalize_parameters(request.params)
 uri = normalize_base_string_uri(request.uri)
 base_string = construct_base_string(request.http_method, uri, norm_params)
 signature = sign_hmac_sha1(base_string, client_secret, resource_owner_secret)
 return safe_string_equals(signature, request.signature)

def verify_hmac_sha1 ( request , client_secret = None , resource_owner_secret = None ) : norm_params = normalize_parameters ( request . params ) uri = normalize_base_string_uri ( request . uri ) base_string = construct_base_string ( request . http_method , uri , norm_params ) signature = sign_hmac_sha1 ( base_string , client_secret , resource_owner_secret ) return safe_string_equals ( signature , request . signature )
verify a hmac-sha1 signature .