Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@staticmethod
def to_list():
return [
_QueryStringConstants.SIGNED_SIGNATURE,
_QueryStringConstants.SIGNED_PERMISSION,
_QueryStringConstants.SIGNED_START,
_QueryStringConstants.SIGNED_EXPIRY,
_QueryStringConstants.SIGNED_RESOURCE,
_QueryStringConstants.SIGNED_IDENTIFIER,
_QueryStringConstants.SIGNED_IP,
_QueryStringConstants.SIGNED_PROTOCOL,
_QueryStringConstants.SIGNED_VERSION,
_QueryStringConstants.SIGNED_CACHE_CONTROL,
_QueryStringConstants.SIGNED_CONTENT_DISPOSITION,
_QueryStringConstants.SIGNED_CONTENT_ENCODING,
_QueryStringConstants.SIGNED_CONTENT_LANGUAGE,
_QueryStringConstants.SIGNED_CONTENT_TYPE,
_QueryStringConstants.START_PK,
_QueryStringConstants.START_RK,
_QueryStringConstants.END_PK,
_QueryStringConstants.END_RK,
_QueryStringConstants.SIGNED_RESOURCE_TYPES,
_QueryStringConstants.SIGNED_SERVICES,
]
@staticmethod
def to_list():
return [
_QueryStringConstants.SIGNED_SIGNATURE,
_QueryStringConstants.SIGNED_PERMISSION,
_QueryStringConstants.SIGNED_START,
_QueryStringConstants.SIGNED_EXPIRY,
_QueryStringConstants.SIGNED_RESOURCE,
_QueryStringConstants.SIGNED_IDENTIFIER,
_QueryStringConstants.SIGNED_IP,
_QueryStringConstants.SIGNED_PROTOCOL,
_QueryStringConstants.SIGNED_VERSION,
_QueryStringConstants.SIGNED_CACHE_CONTROL,
_QueryStringConstants.SIGNED_CONTENT_DISPOSITION,
_QueryStringConstants.SIGNED_CONTENT_ENCODING,
_QueryStringConstants.SIGNED_CONTENT_LANGUAGE,
_QueryStringConstants.SIGNED_CONTENT_TYPE,
_QueryStringConstants.START_PK,
_QueryStringConstants.START_RK,
_QueryStringConstants.END_PK,
_QueryStringConstants.END_RK,
_QueryStringConstants.SIGNED_RESOURCE_TYPES,
_QueryStringConstants.SIGNED_SERVICES,
]
def to_list():
return [
_QueryStringConstants.SIGNED_SIGNATURE,
_QueryStringConstants.SIGNED_PERMISSION,
_QueryStringConstants.SIGNED_START,
_QueryStringConstants.SIGNED_EXPIRY,
_QueryStringConstants.SIGNED_RESOURCE,
_QueryStringConstants.SIGNED_IDENTIFIER,
_QueryStringConstants.SIGNED_IP,
_QueryStringConstants.SIGNED_PROTOCOL,
_QueryStringConstants.SIGNED_VERSION,
_QueryStringConstants.SIGNED_CACHE_CONTROL,
_QueryStringConstants.SIGNED_CONTENT_DISPOSITION,
_QueryStringConstants.SIGNED_CONTENT_ENCODING,
_QueryStringConstants.SIGNED_CONTENT_LANGUAGE,
_QueryStringConstants.SIGNED_CONTENT_TYPE,
_QueryStringConstants.START_PK,
_QueryStringConstants.START_RK,
_QueryStringConstants.END_PK,
_QueryStringConstants.END_RK,
_QueryStringConstants.SIGNED_RESOURCE_TYPES,
_QueryStringConstants.SIGNED_SERVICES,
]
@staticmethod
def to_list():
return [
_QueryStringConstants.SIGNED_SIGNATURE,
_QueryStringConstants.SIGNED_PERMISSION,
_QueryStringConstants.SIGNED_START,
_QueryStringConstants.SIGNED_EXPIRY,
_QueryStringConstants.SIGNED_RESOURCE,
_QueryStringConstants.SIGNED_IDENTIFIER,
_QueryStringConstants.SIGNED_IP,
_QueryStringConstants.SIGNED_PROTOCOL,
_QueryStringConstants.SIGNED_VERSION,
_QueryStringConstants.SIGNED_CACHE_CONTROL,
_QueryStringConstants.SIGNED_CONTENT_DISPOSITION,
_QueryStringConstants.SIGNED_CONTENT_ENCODING,
_QueryStringConstants.SIGNED_CONTENT_LANGUAGE,
_QueryStringConstants.SIGNED_CONTENT_TYPE,
_QueryStringConstants.START_PK,
_QueryStringConstants.START_RK,
_QueryStringConstants.END_PK,
_QueryStringConstants.END_RK,
_QueryStringConstants.SIGNED_RESOURCE_TYPES,
_QueryStringConstants.SIGNED_SERVICES,
]
_QueryStringConstants.SIGNED_EXPIRY,
_QueryStringConstants.SIGNED_RESOURCE,
_QueryStringConstants.SIGNED_IDENTIFIER,
_QueryStringConstants.SIGNED_IP,
_QueryStringConstants.SIGNED_PROTOCOL,
_QueryStringConstants.SIGNED_VERSION,
_QueryStringConstants.SIGNED_CACHE_CONTROL,
_QueryStringConstants.SIGNED_CONTENT_DISPOSITION,
_QueryStringConstants.SIGNED_CONTENT_ENCODING,
_QueryStringConstants.SIGNED_CONTENT_LANGUAGE,
_QueryStringConstants.SIGNED_CONTENT_TYPE,
_QueryStringConstants.START_PK,
_QueryStringConstants.START_RK,
_QueryStringConstants.END_PK,
_QueryStringConstants.END_RK,
_QueryStringConstants.SIGNED_RESOURCE_TYPES,
_QueryStringConstants.SIGNED_SERVICES,
]
def to_list():
return [
_QueryStringConstants.SIGNED_SIGNATURE,
_QueryStringConstants.SIGNED_PERMISSION,
_QueryStringConstants.SIGNED_START,
_QueryStringConstants.SIGNED_EXPIRY,
_QueryStringConstants.SIGNED_RESOURCE,
_QueryStringConstants.SIGNED_IDENTIFIER,
_QueryStringConstants.SIGNED_IP,
_QueryStringConstants.SIGNED_PROTOCOL,
_QueryStringConstants.SIGNED_VERSION,
_QueryStringConstants.SIGNED_CACHE_CONTROL,
_QueryStringConstants.SIGNED_CONTENT_DISPOSITION,
_QueryStringConstants.SIGNED_CONTENT_ENCODING,
_QueryStringConstants.SIGNED_CONTENT_LANGUAGE,
_QueryStringConstants.SIGNED_CONTENT_TYPE,
_QueryStringConstants.START_PK,
_QueryStringConstants.START_RK,
_QueryStringConstants.END_PK,
_QueryStringConstants.END_RK,
_QueryStringConstants.SIGNED_RESOURCE_TYPES,
_QueryStringConstants.SIGNED_SERVICES,
]
def parse_query(query_str):
sas_values = _QueryStringConstants.to_list()
parsed_query = {k: v[0] for k, v in parse_qs(query_str).items()}
sas_params = ["{}={}".format(k, v) for k, v in parsed_query.items() if k in sas_values]
sas_token = None
if sas_params:
sas_token = '&'.join(sas_params)
return parsed_query.get('snapshot'), sas_token
_QueryStringConstants.SIGNED_START,
_QueryStringConstants.SIGNED_EXPIRY,
_QueryStringConstants.SIGNED_RESOURCE,
_QueryStringConstants.SIGNED_IDENTIFIER,
_QueryStringConstants.SIGNED_IP,
_QueryStringConstants.SIGNED_PROTOCOL,
_QueryStringConstants.SIGNED_VERSION,
_QueryStringConstants.SIGNED_CACHE_CONTROL,
_QueryStringConstants.SIGNED_CONTENT_DISPOSITION,
_QueryStringConstants.SIGNED_CONTENT_ENCODING,
_QueryStringConstants.SIGNED_CONTENT_LANGUAGE,
_QueryStringConstants.SIGNED_CONTENT_TYPE,
_QueryStringConstants.START_PK,
_QueryStringConstants.START_RK,
_QueryStringConstants.END_PK,
_QueryStringConstants.END_RK,
_QueryStringConstants.SIGNED_RESOURCE_TYPES,
_QueryStringConstants.SIGNED_SERVICES,
]