Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/api/v1/authorizationServers/{authServerId}
/credentials/keys
""")
body = {}
headers = {}
request, error = await self._request_executor.create_request(
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = []
for item in response.get_body():
result.append(JsonWebKey(item))
except Exception as error:
return (None, response, error)
return (result, response, None)
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = []
for item in response.get_body():
result.append(JsonWebKey(item))
except Exception as error:
return (None, response, error)
return (result, response, None)
body = string.as_dict()
headers = {
"Accept": "application/json",
"Content-Type": "application/x-x509-ca-cert"
}
request, error = await self._request_executor.create_request(
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = JsonWebKey(
response.get_body()
)
except Exception as error:
return (None, response, error)
return (result, response, None)
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = []
for item in response.get_body():
result.append(JsonWebKey(item))
except Exception as error:
return (None, response, error)
return (result, response, None)
request, error = await self._request_executor.create_request(
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = JsonWebKey(
response.get_body()
)
except Exception as error:
return (None, response, error)
return (result, response, None)
if query_params:
encoded_query_params = urlencode(query_params)
api_url += f"/?{encoded_query_params}"
body = {}
headers = {}
request, error = await self._request_executor.create_request(
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = JsonWebKey(
response.get_body()
)
except Exception as error:
return (None, response, error)
return (result, response, None)
if query_params:
encoded_query_params = urlencode(query_params)
api_url += f"/?{encoded_query_params}"
body = {}
headers = {}
request, error = await self._request_executor.create_request(
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = []
for item in response.get_body():
result.append(JsonWebKey(item))
except Exception as error:
return (None, response, error)
return (result, response, None)
request, error = await self._request_executor.create_request(
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = JsonWebKey(
response.get_body()
)
except Exception as error:
return (None, response, error)
return (result, response, None)
http_method, api_url, body, headers
)
if error:
return (None, None, error)
response, error = await self._request_executor\
.execute(request, JsonWebKey)
if error:
return (None, response, error)
try:
result = []
for item in response.get_body():
result.append(JsonWebKey(item))
except Exception as error:
return (None, response, error)
return (result, response, None)