How to use the okta.models.json_web_key.JsonWebKey function in okta

To help you get started, we’ve selected a few okta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github okta / okta-sdk-python / okta / resource_clients / authorization_server_client.py View on Github external
/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)
github okta / okta-sdk-python / okta / resource_clients / application_client.py View on Github external
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)
github okta / okta-sdk-python / okta / resource_clients / application_client.py View on Github external
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)
github okta / okta-sdk-python / okta / resource_clients / authorization_server_client.py View on Github external
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)
github okta / okta-sdk-python / okta / resource_clients / identity_provider_client.py View on Github external
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)
github okta / okta-sdk-python / okta / resource_clients / application_client.py View on Github external
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)
github okta / okta-sdk-python / okta / resource_clients / identity_provider_client.py View on Github external
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)
github okta / okta-sdk-python / okta / resource_clients / identity_provider_client.py View on Github external
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)
github okta / okta-sdk-python / okta / resource_clients / identity_provider_client.py View on Github external
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)