From 19b1adf0acd25b9bef0b213012ed1dadddbac1d4 Mon Sep 17 00:00:00 2001 From: Serhii Buniak Date: Tue, 15 Feb 2022 18:13:32 +0200 Subject: [PATCH 1/8] Add Email Templates API --- okta/client.py | 12 - okta/models/__init__.py | 10 + okta/models/email_template.py | 49 ++ okta/models/email_template_content.py | 61 ++ okta/models/email_template_customization.py | 73 +++ .../email_template_customization_request.py | 57 ++ okta/models/email_template_test_request.py | 45 ++ okta/resource_clients/brand_client.py | 565 ++++++++++++++++++ 8 files changed, 860 insertions(+), 12 deletions(-) create mode 100644 okta/models/email_template.py create mode 100644 okta/models/email_template_content.py create mode 100644 okta/models/email_template_customization.py create mode 100644 okta/models/email_template_customization_request.py create mode 100644 okta/models/email_template_test_request.py diff --git a/okta/client.py b/okta/client.py index 065b32eb..6a84ab37 100644 --- a/okta/client.py +++ b/okta/client.py @@ -17,7 +17,6 @@ # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY # SEE CONTRIBUTOR DOCUMENTATION -import aiohttp import logging from okta.config.config_setter import ConfigSetter @@ -160,17 +159,6 @@ def __init__(self, user_config: dict = {}): if self._config["client"]["logging"]["enabled"] is True: logger = logging.getLogger('okta-sdk-python') logger.disabled = False - - async def __aenter__(self): - """Automatically create and set session within context manager.""" - self._session = aiohttp.ClientSession() - self._request_executor.set_session(self._session) - return self - - async def __aexit__(self, exc_type, exc_val, exc_tb): - """Automatically close session within context manager.""" - await self._session.close() - """ Getters """ diff --git a/okta/models/__init__.py b/okta/models/__init__.py index 4dd16992..9f1b7398 100644 --- a/okta/models/__init__.py +++ b/okta/models/__init__.py @@ -224,6 +224,16 @@ DomainValidationStatus = domain_validation_status.DomainValidationStatus from okta.models import duration as duration Duration = duration.Duration +from okta.models import email_template as email_template +EmailTemplate = email_template.EmailTemplate +from okta.models import email_template_content as email_template_content +EmailTemplateContent = email_template_content.EmailTemplateContent +from okta.models import email_template_customization as email_template_customization +EmailTemplateCustomization = email_template_customization.EmailTemplateCustomization +from okta.models import email_template_customization_request as email_template_customization_request +EmailTemplateCustomizationRequest = email_template_customization_request.EmailTemplateCustomizationRequest +from okta.models import email_template_test_request as email_template_test_request +EmailTemplateTestRequest = email_template_test_request.EmailTemplateTestRequest from okta.models import email_template_touch_point_variant as email_template_touch_point_variant EmailTemplateTouchPointVariant = email_template_touch_point_variant.EmailTemplateTouchPointVariant from okta.models import email_user_factor as email_user_factor diff --git a/okta/models/email_template.py b/okta/models/email_template.py new file mode 100644 index 00000000..cd2dacbf --- /dev/null +++ b/okta/models/email_template.py @@ -0,0 +1,49 @@ +# flake8: noqa +""" +Copyright 2022 - Present Okta, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY +# SEE CONTRIBUTOR DOCUMENTATION + +from okta.okta_object import OktaObject + + +class EmailTemplate( + OktaObject +): + """ + A class for EmailTemplate objects. + """ + + def __init__(self, config=None): + super().__init__(config) + if config: + self.links = config["links"]\ + if "links" in config else None + self.name = config["name"]\ + if "name" in config else None + else: + self.links = None + self.name = None + + def request_format(self): + parent_req_format = super().request_format() + current_obj_format = { + "_links": self.links, + "name": self.name + } + parent_req_format.update(current_obj_format) + return parent_req_format diff --git a/okta/models/email_template_content.py b/okta/models/email_template_content.py new file mode 100644 index 00000000..76944868 --- /dev/null +++ b/okta/models/email_template_content.py @@ -0,0 +1,61 @@ +# flake8: noqa +""" +Copyright 2022 - Present Okta, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY +# SEE CONTRIBUTOR DOCUMENTATION + +from okta.okta_object import OktaObject + + +class EmailTemplateContent( + OktaObject +): + """ + A class for EmailTemplateContent objects. + """ + + def __init__(self, config=None): + super().__init__(config) + if config: + self.links = config["links"]\ + if "links" in config else None + self.body = config["body"]\ + if "body" in config else None + self.from_address = config["fromAddress"]\ + if "fromAddress" in config else None + self.from_name = config["fromName"]\ + if "fromName" in config else None + self.subject = config["subject"]\ + if "subject" in config else None + else: + self.links = None + self.body = None + self.from_address = None + self.from_name = None + self.subject = None + + def request_format(self): + parent_req_format = super().request_format() + current_obj_format = { + "_links": self.links, + "body": self.body, + "fromAddress": self.from_address, + "fromName": self.from_name, + "subject": self.subject + } + parent_req_format.update(current_obj_format) + return parent_req_format diff --git a/okta/models/email_template_customization.py b/okta/models/email_template_customization.py new file mode 100644 index 00000000..b004b630 --- /dev/null +++ b/okta/models/email_template_customization.py @@ -0,0 +1,73 @@ +# flake8: noqa +""" +Copyright 2022 - Present Okta, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY +# SEE CONTRIBUTOR DOCUMENTATION + +from okta.okta_object import OktaObject + + +class EmailTemplateCustomization( + OktaObject +): + """ + A class for EmailTemplateCustomization objects. + """ + + def __init__(self, config=None): + super().__init__(config) + if config: + self.links = config["links"]\ + if "links" in config else None + self.body = config["body"]\ + if "body" in config else None + self.created = config["created"]\ + if "created" in config else None + self.id = config["id"]\ + if "id" in config else None + self.is_default = config["isDefault"]\ + if "isDefault" in config else None + self.language = config["language"]\ + if "language" in config else None + self.last_updated = config["lastUpdated"]\ + if "lastUpdated" in config else None + self.subject = config["subject"]\ + if "subject" in config else None + else: + self.links = None + self.body = None + self.created = None + self.id = None + self.is_default = None + self.language = None + self.last_updated = None + self.subject = None + + def request_format(self): + parent_req_format = super().request_format() + current_obj_format = { + "_links": self.links, + "body": self.body, + "created": self.created, + "id": self.id, + "isDefault": self.is_default, + "language": self.language, + "lastUpdated": self.last_updated, + "subject": self.subject + } + parent_req_format.update(current_obj_format) + return parent_req_format diff --git a/okta/models/email_template_customization_request.py b/okta/models/email_template_customization_request.py new file mode 100644 index 00000000..31d565a8 --- /dev/null +++ b/okta/models/email_template_customization_request.py @@ -0,0 +1,57 @@ +# flake8: noqa +""" +Copyright 2022 - Present Okta, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY +# SEE CONTRIBUTOR DOCUMENTATION + +from okta.okta_object import OktaObject + + +class EmailTemplateCustomizationRequest( + OktaObject +): + """ + A class for EmailTemplateCustomizationRequest objects. + """ + + def __init__(self, config=None): + super().__init__(config) + if config: + self.body = config["body"]\ + if "body" in config else None + self.is_default = config["isDefault"]\ + if "isDefault" in config else None + self.language = config["language"]\ + if "language" in config else None + self.subject = config["subject"]\ + if "subject" in config else None + else: + self.body = None + self.is_default = None + self.language = None + self.subject = None + + def request_format(self): + parent_req_format = super().request_format() + current_obj_format = { + "body": self.body, + "isDefault": self.is_default, + "language": self.language, + "subject": self.subject + } + parent_req_format.update(current_obj_format) + return parent_req_format diff --git a/okta/models/email_template_test_request.py b/okta/models/email_template_test_request.py new file mode 100644 index 00000000..a81ce039 --- /dev/null +++ b/okta/models/email_template_test_request.py @@ -0,0 +1,45 @@ +# flake8: noqa +""" +Copyright 2022 - Present Okta, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY +# SEE CONTRIBUTOR DOCUMENTATION + +from okta.okta_object import OktaObject + + +class EmailTemplateTestRequest( + OktaObject +): + """ + A class for EmailTemplateTestRequest objects. + """ + + def __init__(self, config=None): + super().__init__(config) + if config: + self.customization_id = config["customizationId"]\ + if "customizationId" in config else None + else: + self.customization_id = None + + def request_format(self): + parent_req_format = super().request_format() + current_obj_format = { + "customizationId": self.customization_id + } + parent_req_format.update(current_obj_format) + return parent_req_format diff --git a/okta/resource_clients/brand_client.py b/okta/resource_clients/brand_client.py index 889465b0..0b6e6ce2 100644 --- a/okta/resource_clients/brand_client.py +++ b/okta/resource_clients/brand_client.py @@ -17,8 +17,17 @@ # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY # SEE CONTRIBUTOR DOCUMENTATION +from urllib.parse import urlencode from okta.models.brand\ import Brand +from okta.models.email_template\ + import EmailTemplate +from okta.models.email_template_customization_request\ + import EmailTemplateCustomizationRequest +from okta.models.email_template_customization\ + import EmailTemplateCustomization +from okta.models.email_template_content\ + import EmailTemplateContent from okta.models.theme_response\ import ThemeResponse from okta.models.image_upload_response\ @@ -169,6 +178,562 @@ async def update_brand( return (None, response, error) return (result, response, None) + async def list_email_templates( + self, brandId, query_params={}, + keep_empty_params=False + ): + """ + List email templates in your organization with paginati + on. + Args: + brand_id {str} + query_params {dict}: Map of query parameters for request + [query_params.after] {str} + [query_params.limit] {str} + Returns: + list: Collection of EmailTemplate instances. + """ + http_method = "get".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + """) + if query_params: + encoded_query_params = urlencode(query_params) + api_url += f"/?{encoded_query_params}" + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplate) + + if error: + return (None, response, error) + + try: + result = [] + for item in response.get_body(): + result.append(EmailTemplate( + self.form_response_body(item) + )) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def get_email_template( + self, brandId, templateName, + keep_empty_params=False + ): + """ + Fetch an email template by templateName + Args: + brand_id {str} + template_name {str} + Returns: + EmailTemplate + """ + http_method = "get".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName} + """) + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplate) + + if error: + return (None, response, error) + + try: + result = EmailTemplate( + self.form_response_body(response.get_body()) + ) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def delete_email_template_customizations( + self, brandId, templateName, + keep_empty_params=False + ): + """ + Delete all customizations for an email template. Also k + nown as “Reset to Default”. + Args: + brand_id {str} + template_name {str} + """ + http_method = "delete".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/customizations + """) + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, error) + + response, error = await self._request_executor\ + .execute(request) + + if error: + return (response, error) + + return (response, None) + + async def list_email_template_customizations( + self, brandId, templateName, + keep_empty_params=False + ): + """ + List all email customizations for an email template + Args: + brand_id {str} + template_name {str} + Returns: + list: Collection of EmailTemplateCustomizationRequest instances. + """ + http_method = "get".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/customizations + """) + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplateCustomizationRequest) + + if error: + return (None, response, error) + + try: + result = [] + for item in response.get_body(): + result.append(EmailTemplateCustomizationRequest( + self.form_response_body(item) + )) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def create_email_template_customization( + self, brandId, templateName, email_template_customization_request, + keep_empty_params=False + ): + """ + Create an email customization + Args: + brand_id {str} + template_name {str} + {email_template_customization_request} + Returns: + EmailTemplateCustomization + """ + http_method = "post".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/customizations + """) + + if isinstance(email_template_customization_request, dict): + body = email_template_customization_request + else: + body = email_template_customization_request.as_dict() + headers = { + "Accept": "application/json", + "Content-Type": "application/json" + } + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplateCustomization) + + if error: + return (None, response, error) + + try: + result = EmailTemplateCustomization( + self.form_response_body(response.get_body()) + ) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def delete_email_template_customization( + self, brandId, templateName, customizationId, + keep_empty_params=False + ): + """ + Delete an email customization + Args: + brand_id {str} + template_name {str} + customization_id {str} + """ + http_method = "delete".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/customizations/{customizationId} + """) + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, error) + + response, error = await self._request_executor\ + .execute(request) + + if error: + return (response, error) + + return (response, None) + + async def get_email_template_customization( + self, brandId, templateName, customizationId, + keep_empty_params=False + ): + """ + Fetch an email customization by id. + Args: + brand_id {str} + template_name {str} + customization_id {str} + Returns: + EmailTemplateCustomization + """ + http_method = "get".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/customizations/{customizationId} + """) + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplateCustomization) + + if error: + return (None, response, error) + + try: + result = EmailTemplateCustomization( + self.form_response_body(response.get_body()) + ) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def update_email_template_customization( + self, brandId, templateName, customizationId, email_template_customization_request, + keep_empty_params=False + ): + """ + Update an email customization + Args: + brand_id {str} + template_name {str} + customization_id {str} + {email_template_customization_request} + Returns: + EmailTemplateCustomization + """ + http_method = "put".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/customizations/{customizationId} + """) + + if isinstance(email_template_customization_request, dict): + body = email_template_customization_request + else: + body = email_template_customization_request.as_dict() + headers = { + "Accept": "application/json", + "Content-Type": "application/json" + } + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplateCustomization) + + if error: + return (None, response, error) + + try: + result = EmailTemplateCustomization( + self.form_response_body(response.get_body()) + ) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def get_email_template_customization_preview( + self, brandId, templateName, customizationId, + keep_empty_params=False + ): + """ + Get a preview of an email template customization. + Args: + brand_id {str} + template_name {str} + customization_id {str} + Returns: + EmailTemplateContent + """ + http_method = "get".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/customizations/{customizationId} + /preview + """) + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplateContent) + + if error: + return (None, response, error) + + try: + result = EmailTemplateContent( + self.form_response_body(response.get_body()) + ) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def get_email_template_default_content( + self, brandId, templateName, + keep_empty_params=False + ): + """ + Fetch the default content for an email template. + Args: + brand_id {str} + template_name {str} + Returns: + EmailTemplateContent + """ + http_method = "get".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/default-content + """) + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplateContent) + + if error: + return (None, response, error) + + try: + result = EmailTemplateContent( + self.form_response_body(response.get_body()) + ) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def get_email_template_default_content_preview( + self, brandId, templateName, + keep_empty_params=False + ): + """ + Fetch a preview of an email template's default content + by populating velocity references with the current user + 's environment. + Args: + brand_id {str} + template_name {str} + Returns: + EmailTemplateContent + """ + http_method = "get".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/default-content/preview + """) + + body = {} + headers = {} + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplateContent) + + if error: + return (None, response, error) + + try: + result = EmailTemplateContent( + self.form_response_body(response.get_body()) + ) + except Exception as error: + return (None, response, error) + return (result, response, None) + + async def send_test_email( + self, brandId, templateName, email_template_test_request, + keep_empty_params=False + ): + """ + Send a test email to the current users primary and seco + ndary email addresses. The email content is selected ba + sed on the following priority: + An email customization specifically for the users loc + ale. + The default language of email customizations. + The email templates default content. + Args: + brand_id {str} + template_name {str} + {email_template_test_request} + Returns: + EmailTemplateContent + """ + http_method = "post".upper() + api_url = format_url(f""" + {self._base_url} + /api/v1/brands/{brandId}/templates/email + /{templateName}/test + """) + + if isinstance(email_template_test_request, dict): + body = email_template_test_request + else: + body = email_template_test_request.as_dict() + headers = { + "Accept": "application/json", + "Content-Type": "application/json" + } + form = {} + + request, error = await self._request_executor.create_request( + http_method, api_url, body, headers, form, keep_empty_params=keep_empty_params + ) + + if error: + return (None, None, error) + + response, error = await self._request_executor\ + .execute(request, EmailTemplateContent) + + if error: + return (None, response, error) + + try: + result = EmailTemplateContent( + self.form_response_body(response.get_body()) + ) + except Exception as error: + return (None, response, error) + return (result, response, None) + async def list_brand_themes( self, brandId, keep_empty_params=False From d904bacafb45ba8c432661e934b09a9df8a2b1c2 Mon Sep 17 00:00:00 2001 From: Serhii Buniak Date: Wed, 16 Feb 2022 14:05:01 +0200 Subject: [PATCH 2/8] Add draft tests for email templates api --- tests/integration/test_brands_it.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/integration/test_brands_it.py b/tests/integration/test_brands_it.py index f93b68b0..090ab8f6 100644 --- a/tests/integration/test_brands_it.py +++ b/tests/integration/test_brands_it.py @@ -234,3 +234,28 @@ async def test_upload_brand_theme_logo(self, fs): finally: _, err = await client.delete_brand_theme_logo(brand_id, theme_id) assert err is None + + #@pytest.mark.vcr() + @pytest.mark.asyncio + async def test_list_email_templates(self, fs): + client = MockOktaClient(fs) + brands, _, err = await client.list_brands() + assert err is None + brand_id = brands[0].id + email_templates, _, err = await client.list_email_templates(brand_id) + assert err is None + for template in email_templates: + print(template) + assert isinstance(template, models.EmailTemplate) + + #@pytest.mark.vcr() + @pytest.mark.asyncio + async def test_get_email_template(self, fs): + client = MockOktaClient(fs) + brands, _, err = await client.list_brands() + assert err is None + brand_id = brands[0].id + email_templates, _, err = await client.list_email_templates(brand_id) + assert err is None + template = email_templates[0] + received_template = await client.get_email_template(brand_id, template.name) From 35bf24b060f8d9fcaef62495b3794f404ab78078 Mon Sep 17 00:00:00 2001 From: Serhii Buniak Date: Mon, 21 Feb 2022 19:29:55 +0200 Subject: [PATCH 3/8] Add tests and vcr cassettes for email templates api --- okta/resource_clients/brand_client.py | 6 +- ..._delete_email_template_customizations.yaml | 598 +++++++++++++ ...randsResource.test_get_email_template.yaml | 268 ++++++ ..._email_template_customization_preview.yaml | 784 ++++++++++++++++++ ...t_update_email_template_customization.yaml | 611 ++++++++++++++ ...st_list_email_template_customizations.yaml | 522 ++++++++++++ ...ndsResource.test_list_email_templates.yaml | 181 ++++ tests/integration/test_brands_it.py | 180 +++- 8 files changed, 3143 insertions(+), 7 deletions(-) create mode 100644 tests/integration/cassettes/test_brands_it/TestBrandsResource.test_create_delete_email_template_customizations.yaml create mode 100644 tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_email_template.yaml create mode 100644 tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_email_template_customization_preview.yaml create mode 100644 tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_update_email_template_customization.yaml create mode 100644 tests/integration/cassettes/test_brands_it/TestBrandsResource.test_list_email_template_customizations.yaml create mode 100644 tests/integration/cassettes/test_brands_it/TestBrandsResource.test_list_email_templates.yaml diff --git a/okta/resource_clients/brand_client.py b/okta/resource_clients/brand_client.py index 0b6e6ce2..e9867ca5 100644 --- a/okta/resource_clients/brand_client.py +++ b/okta/resource_clients/brand_client.py @@ -320,7 +320,7 @@ async def list_email_template_customizations( brand_id {str} template_name {str} Returns: - list: Collection of EmailTemplateCustomizationRequest instances. + list: Collection of EmailTemplateCustomization instances. """ http_method = "get".upper() api_url = format_url(f""" @@ -341,7 +341,7 @@ async def list_email_template_customizations( return (None, None, error) response, error = await self._request_executor\ - .execute(request, EmailTemplateCustomizationRequest) + .execute(request, EmailTemplateCustomization) if error: return (None, response, error) @@ -349,7 +349,7 @@ async def list_email_template_customizations( try: result = [] for item in response.get_body(): - result.append(EmailTemplateCustomizationRequest( + result.append(EmailTemplateCustomization( self.form_response_body(item) )) except Exception as error: diff --git a/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_create_delete_email_template_customizations.yaml b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_create_delete_email_template_customizations.yaml new file mode 100644 index 00000000..78609a88 --- /dev/null +++ b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_create_delete_email_template_customizations.yaml @@ -0,0 +1,598 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands + response: + body: + string: '[{"id":"bnd8cxvskK3NpqF6H0w6","removePoweredByOkta":false,"customPrivacyPolicyUrl":null,"_links":{"themes":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/themes","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6","hints":{"allow":["GET","PUT"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:46 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=B1A3E311F4CB135E34FA7616E1A09D5C; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOiytHUoHUmQURqlnPplQAADwY + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '589' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email + response: + body: + string: '[{"name":"welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"tempPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPasswordReset","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:47 GMT + Expires: + - '0' + Link: + - ; + rel="self" + - ; + rel="next" + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=6375589C431F1528C1AE64C6F092BA20; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOiyw1jAr-fy7UF4bEsdwAABqg + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '588' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 14:33:47 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=2B7E9A7382E9C4F558DF406E339C27AB; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhOiy3KU02LO9aInnLUUVwAABl0 + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '587' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: '{"body": "

Bonjour ${user.profile.firstName}. + Activer le compte

", "isDefault": + false, "language": "fr", "subject": "Bienvenue dans ${org.name}!"}' + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: POST + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '{"subject":"Bienvenue dans ${org.name}!","body":"

Bonjour + ${user.profile.firstName}. Activer le compte

","id":"oel8qykgp07khWON30w6","language":"fr","isDefault":true,"created":"2022-02-21T14:33:48.000Z","lastUpdated":"2022-02-21T14:33:48.000Z","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qykgp07khWON30w6/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qykgp07khWON30w6","hints":{"allow":["GET","PUT","DELETE"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:48 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=D6F8C44EAD8F24EFD426384406B6E466; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOizJla-6hZwShL0vHCHQAACNY + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '586' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 201 + message: Created + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: '{"body": "

Hello ${user.profile.firstName}. + Activate account

", "isDefault": + false, "language": "en", "subject": "Welcome to ${org.name}!"}' + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: POST + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '{"subject":"Welcome to ${org.name}!","body":"

Hello + ${user.profile.firstName}. Activate account

","id":"oel8qz8yl2s0DsaYH0w6","language":"en","isDefault":false,"created":"2022-02-21T14:33:48.000Z","lastUpdated":"2022-02-21T14:33:48.000Z","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8yl2s0DsaYH0w6/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8yl2s0DsaYH0w6","hints":{"allow":["GET","PUT","DELETE"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:48 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=7E76CAB75E0F208377B4BACB242971DA; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOizJla-6hZwShL0vHCHgAACNY + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '585' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 201 + message: Created + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8yl2s0DsaYH0w6 + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 14:33:49 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=EC5CE2307119E8851196667B09DCB1EF; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhOizfupQVmwYq972xDWmgAABxM + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '584' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8yl2s0DsaYH0w6 +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 14:33:49 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=133BCEB8489E73295F00C2EB15775FD2; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhOizcPk2Dy8Yro1r7R@9gAAAGY + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '583' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +version: 1 diff --git a/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_email_template.yaml b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_email_template.yaml new file mode 100644 index 00000000..f79089cd --- /dev/null +++ b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_email_template.yaml @@ -0,0 +1,268 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands + response: + body: + string: '[{"id":"bnd8cxvskK3NpqF6H0w6","removePoweredByOkta":false,"customPrivacyPolicyUrl":null,"_links":{"themes":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/themes","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6","hints":{"allow":["GET","PUT"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:41 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=73D6BAC06D1DDDF9CB3F9AE5391732BA; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOixdzW4JTadQCMd6ahfQAAA-Q + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '597' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email + response: + body: + string: '[{"name":"welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"tempPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPasswordReset","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:41 GMT + Expires: + - '0' + Link: + - ; + rel="self" + - ; + rel="next" + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=8ADF716A0972BBB4C7C63BCB60A09D53; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOixbP1y@YfWCUKP4@GDQAAA9Y + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '596' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome + response: + body: + string: '{"name":"welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:42 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=65721C41E5E98C55D6952260A9A9FED6; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOixqJx2XPybkSIgANe8gAABLo + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '595' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome +version: 1 diff --git a/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_email_template_customization_preview.yaml b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_email_template_customization_preview.yaml new file mode 100644 index 00000000..c9e773e6 --- /dev/null +++ b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_email_template_customization_preview.yaml @@ -0,0 +1,784 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands + response: + body: + string: '[{"id":"bnd8cxvskK3NpqF6H0w6","removePoweredByOkta":false,"customPrivacyPolicyUrl":null,"_links":{"themes":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/themes","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6","hints":{"allow":["GET","PUT"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:04 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=D960F62871D4B175AFAE92166747EA9A; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi3MPk2Dy8Yro1r7R@-AAAAGY + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '575' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email + response: + body: + string: '[{"name":"welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"tempPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPasswordReset","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:05 GMT + Expires: + - '0' + Link: + - ; + rel="self" + - ; + rel="next" + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=955B937FD70FE344AAFE33EF4B2F002C; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi3SwT54@nocbTVEEnNgAAANw + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '574' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 14:34:05 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=9B2A74475574992B935150CAE9EA511F; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhOi3cqaLa6h3bS0xykzrAAADeU + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '573' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: '{"body": "

Hello ${user.profile.firstName}. + Activate account

", "isDefault": + true, "language": "en", "subject": "Hello, welcome to ${org.name}!"}' + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: POST + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '{"subject":"Hello, welcome to ${org.name}!","body":"

Hello + ${user.profile.firstName}. Activate account

","id":"oel8qylaj8wqHe4og0w6","language":"en","isDefault":true,"created":"2022-02-21T14:34:06.000Z","lastUpdated":"2022-02-21T14:34:06.000Z","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qylaj8wqHe4og0w6/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qylaj8wqHe4og0w6","hints":{"allow":["GET","PUT","DELETE"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:06 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=0AC53304AE125A440B0807E06C829ECA; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi3iwT54@nocbTVEEnNwAAANw + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '572' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 201 + message: Created + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qylaj8wqHe4og0w6/preview + response: + body: + string: '{"subject":"Hello, welcome to test!","body":"\n\n

Hello + John. Activate account

","_links":{"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qylaj8wqHe4og0w6/preview","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:06 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=CC40CCFD00F43581436A2418B3F08F73; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi3sqaLa6h3bS0xykzrQAADeU + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '571' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qylaj8wqHe4og0w6/preview +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content + response: + body: + string: '{"subject":"Welcome to Okta!","body":"\n\n\n \n\n\n
\n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n ${org.name} + - Welcome to Okta!\n
\n Hi + $!{StringTool.escapeHtml($!{user.profile.firstName})},\n
\n Your organization is + using Okta to manage your web applications. This means you can conveniently + access all the applications you normally use, through a single, secure home + page. Watch this short video to learn more: https://www.okta.com/intro-to-okta/\n
\n Your system administrator + has created an Okta user account for you.
\n Click + the following link to activate your Okta account:\n
\n \n \n \n \n \n \n \n
Activate Okta Account\n
\n This + link expires in ${f.formatTimeDiffHoursNowInUserLocale(${org.activationTokenExpirationHours})}.\n
\n
\n Your username is ${user.profile.login}
\n Your + organization''s sign-in page is ${baseURL}\n
\n If you experience difficulties + accessing your account, you can send a help request to your system administrator + using the link: ${baseURL}/help/login\n
\n
\n This + is an automatically generated message from Okta. Replies are not monitored or answered.\n
\n
\n\n\n","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:07 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=6D07DFECF82ED030E47FDDDD73C0ECE3; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi38TxjJbD1HvTqWfJRAAAC@E + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '570' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content/preview + response: + body: + string: '{"subject":"Welcome to Okta!","body":"\n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
+ \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
test - Welcome + to Okta!
Hi John,
Your organization is using Okta to manage your + web applications. This means you can conveniently access all the applications + you normally use, through a single, secure home page. Watch this short video + to learn more: https://www.okta.com/intro-to-okta/ +
+ Your system administrator has created an Okta user account for you.
+ Click the following link to activate your Okta account:
\n \n \n \n \n \n \n \n \n \n
Activate Okta Account
This link expires in 7 days.
+
+ Your username is John.Doe@okta.com
Your organization''s + sign-in page is https://test.okta.com +
+ If you experience difficulties accessing your account, you can send a help + request to your system administrator using the link: https://test.okta.com/help/login +
This is an automatically + generated message from Okta. Replies are not monitored or answered.
+ \n
","_links":{"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content/preview","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:08 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=2794D8E4E33AA5959E87B3E53DBBB56E; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi39HUoHUmQURqlnPpnAAAD5c + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '569' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content/preview +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 14:34:08 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=0C1AD8816744FC4CE6C673BA3B4AA66B; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhOi4KJx2XPybkSIgANe@AAABLo + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '568' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +version: 1 diff --git a/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_update_email_template_customization.yaml b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_update_email_template_customization.yaml new file mode 100644 index 00000000..034cf1fb --- /dev/null +++ b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_get_update_email_template_customization.yaml @@ -0,0 +1,611 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands + response: + body: + string: '[{"id":"bnd8cxvskK3NpqF6H0w6","removePoweredByOkta":false,"customPrivacyPolicyUrl":null,"_links":{"themes":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/themes","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6","hints":{"allow":["GET","PUT"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:50 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=B3699A924B8389CAB65B655D08FC5706; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOizmgqHuSvYERjcQ6QNAAADw4 + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '582' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email + response: + body: + string: '[{"name":"welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"tempPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPasswordReset","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:56 GMT + Expires: + - '0' + Link: + - ; + rel="self" + - ; + rel="next" + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=9E3D194E2F4528C1945E2803DC9D5B04; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOizw1jAr-fy7UF4bEsegAABwQ + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '581' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 14:34:01 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=C062E7FC19C90883E1269C10A7AFDBC9; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhOi1Er@jeWDt9tAsflrEgAABPw + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '580' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: '{"body": "

Bonjour ${user.profile.firstName}. + Activer le compte

", "isDefault": + true, "language": "fr", "subject": "Bienvenue dans ${org.name}!"}' + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: POST + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '{"subject":"Bienvenue dans ${org.name}!","body":"

Bonjour + ${user.profile.firstName}. Activer le compte

","id":"oel8qz8ymYyo3BtGr0w6","language":"fr","isDefault":true,"created":"2022-02-21T14:34:02.000Z","lastUpdated":"2022-02-21T14:34:02.000Z","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6","hints":{"allow":["GET","PUT","DELETE"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:02 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=5A4523E21A0B8048C658C76AB9EF7374; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi2vupQVmwYq972xDWnQAABxM + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '579' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 201 + message: Created + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: '{"body": "

Hello ${user.profile.firstName}. + Activate account

", "isDefault": + true, "language": "en", "subject": "Welcome to ${org.name}!"}' + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: PUT + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6 + response: + body: + string: '{"subject":"Welcome to ${org.name}!","body":"

Hello + ${user.profile.firstName}. Activate account

","id":"oel8qz8ymYyo3BtGr0w6","language":"en","isDefault":true,"created":"2022-02-21T14:34:02.000Z","lastUpdated":"2022-02-21T14:34:02.000Z","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6","hints":{"allow":["GET","PUT","DELETE"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:02 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=B83F7FDCEC89EEA8FE1884FD799AEE72; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi2sTxjJbD1HvTqWfJQwAAC@E + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '578' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6 +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6 + response: + body: + string: '{"subject":"Welcome to ${org.name}!","body":"

Hello + ${user.profile.firstName}. Activate account

","id":"oel8qz8ymYyo3BtGr0w6","language":"en","isDefault":true,"created":"2022-02-21T14:34:02.000Z","lastUpdated":"2022-02-21T14:34:02.000Z","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6","hints":{"allow":["GET","PUT","DELETE"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:34:03 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=C2E0FD6BB6E4C9D5221B4C41E0A2FC39; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOi28Pk2Dy8Yro1r7R@@wAAAGY + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '577' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz8ymYyo3BtGr0w6 +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 14:34:03 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=4AF8B1B7FB95C0D320464CD62CCD8BB9; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhOi2w1jAr-fy7UF4bEsgAAABqg + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '576' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +version: 1 diff --git a/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_list_email_template_customizations.yaml b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_list_email_template_customizations.yaml new file mode 100644 index 00000000..a8aa7a97 --- /dev/null +++ b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_list_email_template_customizations.yaml @@ -0,0 +1,522 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands + response: + body: + string: '[{"id":"bnd8cxvskK3NpqF6H0w6","removePoweredByOkta":false,"customPrivacyPolicyUrl":null,"_links":{"themes":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/themes","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6","hints":{"allow":["GET","PUT"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 17:18:18 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=88DC4682C9C820B0B24ABAF3A94E9AA6; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhPJWsTxjJbD1HvTqWfQxAAADFw + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '593' + x-rate-limit-reset: + - '1645463904' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email + response: + body: + string: '[{"name":"welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"tempPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPasswordReset","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 17:18:18 GMT + Expires: + - '0' + Link: + - ; + rel="self" + - ; + rel="next" + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=30F02D89EB89AD6606141B9856322D43; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhPJWrP1y@YfWCUKP4@LjAAAA7g + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '592' + x-rate-limit-reset: + - '1645463904' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 17:18:19 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=5C6B03755E86E30D190D23CD762A5EA4; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhPJW9zW4JTadQCMd6apOwAABDM + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '591' + x-rate-limit-reset: + - '1645463904' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: '{"body": "

Hello ${user.profile.firstName}. + Activate account

", "isDefault": + false, "language": "en", "subject": "Welcome to ${org.name}!"}' + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: POST + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '{"subject":"Welcome to ${org.name}!","body":"

Hello + ${user.profile.firstName}. Activate account

","id":"oel8qz92wHcFhTMci0w6","language":"en","isDefault":true,"created":"2022-02-21T17:18:20.000Z","lastUpdated":"2022-02-21T17:18:20.000Z","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz92wHcFhTMci0w6/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz92wHcFhTMci0w6","hints":{"allow":["GET","PUT","DELETE"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 17:18:20 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=78BCF75CD16066F7750194E7748C3882; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhPJW1FqolZMVo6VH0sGJQAAB-c + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '590' + x-rate-limit-reset: + - '1645463904' + x-xss-protection: + - '0' + status: + code: 201 + message: Created + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '[{"subject":"Welcome to ${org.name}!","body":"

Hello + ${user.profile.firstName}. Activate account

","id":"oel8qz92wHcFhTMci0w6","language":"en","isDefault":true,"created":"2022-02-21T17:18:20.000Z","lastUpdated":"2022-02-21T17:18:20.000Z","_links":{"preview":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz92wHcFhTMci0w6/preview","hints":{"allow":["GET"]}},"template":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations/oel8qz92wHcFhTMci0w6","hints":{"allow":["GET","PUT","DELETE"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 17:18:20 GMT + Expires: + - '0' + Link: + - ; + rel="self" + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=CB1B2A7475F592AA527859BB2C4803E9; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhPJXJ-trhoIOQmlSvDamQAACYg + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '589' + x-rate-limit-reset: + - '1645463904' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + Content-Type: + - application/json + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: DELETE + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Date: + - Mon, 21 Feb 2022 17:18:21 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=795424BD666BC80AEFDE636A635AABAE; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-frame-options: + - SAMEORIGIN + x-okta-request-id: + - YhPJXVuB1vHaeV2Ld@TW@wAACoY + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '588' + x-rate-limit-reset: + - '1645463904' + x-xss-protection: + - '0' + status: + code: 204 + message: No Content + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations +version: 1 diff --git a/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_list_email_templates.yaml b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_list_email_templates.yaml new file mode 100644 index 00000000..5e8a9266 --- /dev/null +++ b/tests/integration/cassettes/test_brands_it/TestBrandsResource.test_list_email_templates.yaml @@ -0,0 +1,181 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands + response: + body: + string: '[{"id":"bnd8cxvskK3NpqF6H0w6","removePoweredByOkta":false,"customPrivacyPolicyUrl":null,"_links":{"themes":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/themes","hints":{"allow":["GET"]}},"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6","hints":{"allow":["GET","PUT"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:40 GMT + Expires: + - '0' + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=3D4D9777809CC0559CA2D77BF4AC69A0; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOiw9HUoHUmQURqlnPpkwAADwY + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '599' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands +- request: + body: null + headers: + Accept: + - application/json + Authorization: + - SSWS myAPIToken + User-Agent: + - okta-sdk-python/2.4.0 python/3.8.2 Darwin/20.6.0 + method: GET + uri: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email + response: + body: + string: '[{"name":"welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"tempPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/tempPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ad.forgotPasswordReset","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ad.forgotPasswordReset/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.welcome","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.welcome/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPassword","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPassword/customizations","hints":{"allow":["GET","POST","DELETE"]}}}},{"name":"ldap.forgotPasswordDenied","_links":{"self":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied","hints":{"allow":["GET"]}},"defaultContent":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/default-content","hints":{"allow":["GET"]}},"test":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/test","hints":{"allow":["POST"]}},"customizations":{"href":"https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email/ldap.forgotPasswordDenied/customizations","hints":{"allow":["GET","POST","DELETE"]}}}}]' + headers: + Cache-Control: + - no-cache, no-store + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Mon, 21 Feb 2022 14:33:40 GMT + Expires: + - '0' + Link: + - ; + rel="self" + - ; + rel="next" + Pragma: + - no-cache + Public-Key-Pins-Report-Only: + - pin-sha256="MAbZWK1eIklkAxEkc7uqoZ/QX3cgLZT0HY5TRG1JXrs="; pin-sha256="PJ1QGTlW5ViFNhswMsYKp4X8C7KdG8nDW4ZcXLmYMyI="; + pin-sha256="5LlRWGTBVjpfNXXU5T7cYVUbOSPcgpMgdjaWd/R9Leg="; pin-sha256="lpaMLlEsp7/dVZoeWt3f9ciJIMGimixAIaKNsn9/bCY="; + max-age=60; report-uri="https://okta.report-uri.com/r/default/hpkp/reportOnly" + Server: + - nginx + Set-Cookie: + - sid=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - autolaunch_triggered=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ + - JSESSIONID=51B51F5E22188E33C8B883BABDD2A817; Path=/; Secure; HttpOnly + Strict-Transport-Security: + - max-age=315360000; includeSubDomains + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + content-security-policy: + - 'default-src ''self'' test.okta.com *.oktacdn.com; connect-src ''self'' + test.okta.com test-admin.okta.com *.oktacdn.com *.mixpanel.com + *.mapbox.com app.pendo.io data.pendo.io pendo-static-5634101834153984.storage.googleapis.com + test.kerberos.okta.com *.authenticatorlocaldev.com:8769 http://localhost:8769 + http://127.0.0.1:8769 *.authenticatorlocaldev.com:65111 http://localhost:65111 + http://127.0.0.1:65111 *.authenticatorlocaldev.com:65121 http://localhost:65121 + http://127.0.0.1:65121 *.authenticatorlocaldev.com:65131 http://localhost:65131 + http://127.0.0.1:65131 *.authenticatorlocaldev.com:65141 http://localhost:65141 + http://127.0.0.1:65141 *.authenticatorlocaldev.com:65151 http://localhost:65151 + http://127.0.0.1:65151 https://oinmanager.okta.com data:; script-src + ''unsafe-inline'' ''unsafe-eval'' ''self'' test.okta.com *.oktacdn.com; + style-src ''unsafe-inline'' ''self'' test.okta.com *.oktacdn.com + app.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com; + frame-src ''self'' test.okta.com test-admin.okta.com login.okta.com + com-okta-authenticator:; img-src ''self'' test.okta.com *.oktacdn.com + *.tiles.mapbox.com *.mapbox.com app.pendo.io data.pendo.io cdn.pendo.io pendo-static-5634101834153984.storage.googleapis.com + data: blob:; font-src ''self'' test.okta.com data: *.oktacdn.com + fonts.gstatic.com; frame-ancestors ''self''; report-uri https://okta.report-uri.com/r/d/csp/enforce; + report-to csp' + expect-ct: + - report-uri="https://oktaexpectct.report-uri.com/r/t/ct/reportOnly", max-age=0 + p3p: + - CP="HONK" + report-to: + - '{"group":"csp","max_age":31536000,"endpoints":[{"url":"https://okta.report-uri.com/a/d/g"}],"include_subdomains":true}' + x-content-type-options: + - nosniff + x-okta-request-id: + - YhOixKJx2XPybkSIgANe8AAABLo + x-rate-limit-limit: + - '600' + x-rate-limit-remaining: + - '598' + x-rate-limit-reset: + - '1645454079' + x-xss-protection: + - '0' + status: + code: 200 + message: OK + url: https://test.okta.com/api/v1/brands/bnd8cxvskK3NpqF6H0w6/templates/email +version: 1 diff --git a/tests/integration/test_brands_it.py b/tests/integration/test_brands_it.py index 090ab8f6..08b7441b 100644 --- a/tests/integration/test_brands_it.py +++ b/tests/integration/test_brands_it.py @@ -235,7 +235,7 @@ async def test_upload_brand_theme_logo(self, fs): _, err = await client.delete_brand_theme_logo(brand_id, theme_id) assert err is None - #@pytest.mark.vcr() + @pytest.mark.vcr() @pytest.mark.asyncio async def test_list_email_templates(self, fs): client = MockOktaClient(fs) @@ -245,10 +245,9 @@ async def test_list_email_templates(self, fs): email_templates, _, err = await client.list_email_templates(brand_id) assert err is None for template in email_templates: - print(template) assert isinstance(template, models.EmailTemplate) - #@pytest.mark.vcr() + @pytest.mark.vcr() @pytest.mark.asyncio async def test_get_email_template(self, fs): client = MockOktaClient(fs) @@ -258,4 +257,177 @@ async def test_get_email_template(self, fs): email_templates, _, err = await client.list_email_templates(brand_id) assert err is None template = email_templates[0] - received_template = await client.get_email_template(brand_id, template.name) + received_template, _, err = await client.get_email_template(brand_id, template.name) + assert isinstance(received_template, models.EmailTemplate) + assert template.name == received_template.name + + @pytest.mark.vcr() + @pytest.mark.asyncio + async def test_list_email_template_customizations(self, fs): + client = MockOktaClient(fs) + brands, _, err = await client.list_brands() + assert err is None + brand_id = brands[0].id + email_templates, _, err = await client.list_email_templates(brand_id) + assert err is None + template = email_templates[0] + + # clear all customizations + _, err = await client.delete_email_template_customizations(brand_id, template.name) + assert err is None + + # create email template customization + email_template_customization_request = models.EmailTemplateCustomizationRequest({ + "language": "en", + "subject": "Welcome to ${org.name}!", + "body": "

Hello ${user.profile.firstName}. Activate account

", + "isDefault": False + }) + customization, _, err = await client.create_email_template_customization(brand_id, template.name, email_template_customization_request) + assert err is None + assert isinstance(customization, models.EmailTemplateCustomization) + + customizations, _, err = await client.list_email_template_customizations(brand_id, template.name) + assert err is None + assert len(customizations) == 1 + for template_customization in customizations: + assert isinstance(template_customization, models.EmailTemplateCustomization) + + # clear all customizations + _, err = await client.delete_email_template_customizations(brand_id, template.name) + assert err is None + + @pytest.mark.vcr() + @pytest.mark.asyncio + async def test_create_delete_email_template_customizations(self, fs): + client = MockOktaClient(fs) + brands, _, err = await client.list_brands() + assert err is None + brand_id = brands[0].id + email_templates, _, err = await client.list_email_templates(brand_id) + assert err is None + template = email_templates[0] + + # clear all customizations + _, err = await client.delete_email_template_customizations(brand_id, template.name) + assert err is None + + email_template_customization_request = models.EmailTemplateCustomizationRequest({ + "language": "fr", + "subject": "Bienvenue dans ${org.name}!", + "body": "

Bonjour ${user.profile.firstName}. Activer le compte

", + "isDefault": False + }) + customization, _, err = await client.create_email_template_customization(brand_id, template.name, email_template_customization_request) + assert err is None + assert isinstance(customization, models.EmailTemplateCustomization) + assert customization.language == 'fr' + + # create 2nd customization as it is possible to delete only non-default customization + email_template_customization_request = models.EmailTemplateCustomizationRequest({ + "language": "en", + "subject": "Welcome to ${org.name}!", + "body": "

Hello ${user.profile.firstName}. Activate account

", + "isDefault": False + }) + customization, _, err = await client.create_email_template_customization(brand_id, template.name, email_template_customization_request) + assert err is None + assert isinstance(customization, models.EmailTemplateCustomization) + assert customization.language == 'en' + + _, err = await client.delete_email_template_customization(brand_id, template.name, customization.id) + assert err is None + + # clear all customizations + _, err = await client.delete_email_template_customizations(brand_id, template.name) + assert err is None + + @pytest.mark.vcr() + @pytest.mark.asyncio + async def test_get_update_email_template_customization(self, fs): + client = MockOktaClient(fs) + brands, _, err = await client.list_brands() + assert err is None + brand_id = brands[0].id + email_templates, _, err = await client.list_email_templates(brand_id) + assert err is None + template = email_templates[0] + + # clear all customizations + _, err = await client.delete_email_template_customizations(brand_id, template.name) + assert err is None + + email_template_customization_request = models.EmailTemplateCustomizationRequest({ + "language": "fr", + "subject": "Bienvenue dans ${org.name}!", + "body": "

Bonjour ${user.profile.firstName}. Activer le compte

", + "isDefault": True + }) + customization, _, err = await client.create_email_template_customization(brand_id, template.name, email_template_customization_request) + assert err is None + assert isinstance(customization, models.EmailTemplateCustomization) + assert customization.language == 'fr' + + # update customization + email_template_customization_request = models.EmailTemplateCustomizationRequest({ + "language": "en", + "subject": "Welcome to ${org.name}!", + "body": "

Hello ${user.profile.firstName}. Activate account

", + "isDefault": True + }) + customization, _, err = await client.update_email_template_customization(brand_id, template.name, customization.id, email_template_customization_request) + assert err is None + assert customization.language == 'en' + + # get customization + customization, _, err = await client.get_email_template_customization(brand_id, template.name, customization.id) + assert err is None + assert customization.language == 'en' + + # clear all customizations + _, err = await client.delete_email_template_customizations(brand_id, template.name) + assert err is None + + @pytest.mark.vcr() + @pytest.mark.asyncio + async def test_get_email_template_customization_preview(self, fs): + client = MockOktaClient(fs) + brands, _, err = await client.list_brands() + assert err is None + brand_id = brands[0].id + email_templates, _, err = await client.list_email_templates(brand_id) + assert err is None + template = email_templates[0] + + # clear all customizations + _, err = await client.delete_email_template_customizations(brand_id, template.name) + assert err is None + + email_template_customization_request = models.EmailTemplateCustomizationRequest({ + "language": "en", + "subject": "Hello, welcome to ${org.name}!", + "body": "

Hello ${user.profile.firstName}. Activate account

", + "isDefault": True + }) + + customization, _, err = await client.create_email_template_customization(brand_id, template.name, email_template_customization_request) + assert err is None + + preview, _, err = await client.get_email_template_customization_preview(brand_id, template.name, customization.id) + assert err is None + assert isinstance(preview, models.EmailTemplateContent) + assert 'Hello, welcome to' in preview.subject + + preview, _, err = await client.get_email_template_default_content(brand_id, template.name) + assert err is None + assert isinstance(preview, models.EmailTemplateContent) + assert 'Welcome to Okta' in preview.subject + + preview, _, err = await client.get_email_template_default_content_preview(brand_id, template.name) + assert err is None + assert isinstance(preview, models.EmailTemplateContent) + assert 'Welcome to Okta' in preview.subject + + # clear all customizations + _, err = await client.delete_email_template_customizations(brand_id, template.name) + assert err is None From 5a786d881564b8208869c60e8adf5ea481f95be2 Mon Sep 17 00:00:00 2001 From: Serhii Buniak Date: Mon, 21 Feb 2022 20:00:35 +0200 Subject: [PATCH 4/8] Return back accidentally removed code --- okta/client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/okta/client.py b/okta/client.py index 6a84ab37..065b32eb 100644 --- a/okta/client.py +++ b/okta/client.py @@ -17,6 +17,7 @@ # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY # SEE CONTRIBUTOR DOCUMENTATION +import aiohttp import logging from okta.config.config_setter import ConfigSetter @@ -159,6 +160,17 @@ def __init__(self, user_config: dict = {}): if self._config["client"]["logging"]["enabled"] is True: logger = logging.getLogger('okta-sdk-python') logger.disabled = False + + async def __aenter__(self): + """Automatically create and set session within context manager.""" + self._session = aiohttp.ClientSession() + self._request_executor.set_session(self._session) + return self + + async def __aexit__(self, exc_type, exc_val, exc_tb): + """Automatically close session within context manager.""" + await self._session.close() + """ Getters """ From bd8dc2ef897d9f988adae3f71245eb313a5d228d Mon Sep 17 00:00:00 2001 From: Serhii Buniak Date: Tue, 22 Feb 2022 11:13:20 +0200 Subject: [PATCH 5/8] Fix lint error --- okta/resource_clients/brand_client.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/okta/resource_clients/brand_client.py b/okta/resource_clients/brand_client.py index e9867ca5..1ce42a43 100644 --- a/okta/resource_clients/brand_client.py +++ b/okta/resource_clients/brand_client.py @@ -22,8 +22,6 @@ import Brand from okta.models.email_template\ import EmailTemplate -from okta.models.email_template_customization_request\ - import EmailTemplateCustomizationRequest from okta.models.email_template_customization\ import EmailTemplateCustomization from okta.models.email_template_content\ From ce2d6f116124356ec9bb5494488c65c7439e0627 Mon Sep 17 00:00:00 2001 From: Brian Retterer Date: Wed, 16 Mar 2022 14:54:21 -0400 Subject: [PATCH 6/8] Fixes to generation to add in manually added code Updates to spec 2.11.1 Sets up copyright correctly --- openapi/package.json | 2 +- openapi/templates/client.py.hbs | 12 + openapi/yarn.lock | 780 ++++++++++++++++---------------- 3 files changed, 403 insertions(+), 391 deletions(-) diff --git a/openapi/package.json b/openapi/package.json index fb9ebb32..4f14e37d 100644 --- a/openapi/package.json +++ b/openapi/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@okta/openapi": "^2.10.0", + "@okta/openapi": "^2.11.0", "lodash": "^4.17.15" }, "scripts": { diff --git a/openapi/templates/client.py.hbs b/openapi/templates/client.py.hbs index f244ca7f..9bdb4b79 100644 --- a/openapi/templates/client.py.hbs +++ b/openapi/templates/client.py.hbs @@ -1,5 +1,6 @@ {{> partials.copyrightHeader }} +import aiohttp import logging from okta.config.config_setter import ConfigSetter @@ -71,6 +72,17 @@ class Client( if self._config["client"]["logging"]["enabled"] is True: logger = logging.getLogger('okta-sdk-python') logger.disabled = False + + async def __aenter__(self): + """Automatically create and set session within context manager.""" + self._session = aiohttp.ClientSession() + self._request_executor.set_session(self._session) + return self + + async def __aexit__(self, exc_type, exc_val, exc_tb): + """Automatically close session within context manager.""" + await self._session.close() + """ Getters """ diff --git a/openapi/yarn.lock b/openapi/yarn.lock index 1ef03074..ddc5587a 100644 --- a/openapi/yarn.lock +++ b/openapi/yarn.lock @@ -2,446 +2,446 @@ # yarn lockfile v1 -"@okta/openapi@^2.10.0": - "integrity" "sha512-QYdQIHy4zGE4MqlAcGMqeuTvH1bPzqlf8rVd0tlKKSbb1UWtu+HSkNnFJj005fE3+OX++Z0YvumygYhpylXsxQ==" - "resolved" "https://registry.npmjs.org/@okta/openapi/-/openapi-2.10.0.tgz" - "version" "2.10.0" +"@okta/openapi@^2.11.0": + version "2.11.1" + resolved "https://registry.yarnpkg.com/@okta/openapi/-/openapi-2.11.1.tgz#49e9738fbd68520b7a2deaf74d63f67e41a3e924" + integrity sha512-FdDTwscwULg94nGFAhlncLpKr+46nfkjWe2npe9+Th8xaMcnRYtymsUMI8wXNMrOxOJ9+lxTplnfJVl1n4i/Cw== dependencies: - "commander" "2.9.0" - "fs-extra" "3.0.1" - "handlebars" "^4.7.6" - "js-yaml" "^3.13.1" - "json-stable-stringify" "1.0.1" - "node-fetch" "^2.6.0" - "swagger-cli" "^2.3.0" + commander "2.9.0" + fs-extra "3.0.1" + handlebars "^4.7.6" + js-yaml "^3.13.1" + json-stable-stringify "1.0.1" + node-fetch "^2.6.0" + swagger-cli "^2.3.0" "@types/color-name@^1.1.1": - "integrity" "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" - "resolved" "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz" - "version" "1.1.1" - -"ansi-regex@^5.0.0": - "integrity" "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - "resolved" "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - "version" "5.0.1" - -"ansi-styles@^4.0.0", "ansi-styles@^4.1.0": - "integrity" "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==" - "resolved" "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz" - "version" "4.2.1" + version "1.1.1" + resolved "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + +ansi-regex@^5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== dependencies: "@types/color-name" "^1.1.1" - "color-convert" "^2.0.1" + color-convert "^2.0.1" -"argparse@^1.0.7": - "integrity" "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==" - "resolved" "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - "version" "1.0.10" +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: - "sprintf-js" "~1.0.2" - -"call-me-maybe@^1.0.1": - "integrity" "sha1-JtII6onje1y95gJQoV8DHBak1ms=" - "resolved" "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz" - "version" "1.0.1" - -"camelcase@^5.0.0": - "integrity" "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - "resolved" "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - "version" "5.3.1" - -"chalk@^3.0.0": - "integrity" "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==" - "resolved" "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz" - "version" "3.0.0" + sprintf-js "~1.0.2" + +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== dependencies: - "ansi-styles" "^4.1.0" - "supports-color" "^7.1.0" + ansi-styles "^4.1.0" + supports-color "^7.1.0" -"cliui@^6.0.0": - "integrity" "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==" - "resolved" "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz" - "version" "6.0.0" +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== dependencies: - "string-width" "^4.2.0" - "strip-ansi" "^6.0.0" - "wrap-ansi" "^6.2.0" - -"color-convert@^2.0.1": - "integrity" "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==" - "resolved" "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - "version" "2.0.1" + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: - "color-name" "~1.1.4" + color-name "~1.1.4" -"color-name@~1.1.4": - "integrity" "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - "resolved" "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - "version" "1.1.4" +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -"commander@^2.7.1", "commander@2.9.0": - "integrity" "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=" - "resolved" "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz" - "version" "2.9.0" +commander@2.9.0, commander@^2.7.1: + version "2.9.0" + resolved "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz" + integrity sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q= dependencies: - "graceful-readlink" ">= 1.0.0" - -"decamelize@^1.2.0": - "integrity" "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - "resolved" "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" - "version" "1.2.0" - -"emoji-regex@^8.0.0": - "integrity" "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - "resolved" "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - "version" "8.0.0" - -"esprima@^4.0.0": - "integrity" "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - "resolved" "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - "version" "4.0.1" - -"find-up@^4.1.0": - "integrity" "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==" - "resolved" "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - "version" "4.1.0" + graceful-readlink ">= 1.0.0" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: - "locate-path" "^5.0.0" - "path-exists" "^4.0.0" + locate-path "^5.0.0" + path-exists "^4.0.0" -"fs-extra@3.0.1": - "integrity" "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=" - "resolved" "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz" - "version" "3.0.1" +fs-extra@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz" + integrity sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE= dependencies: - "graceful-fs" "^4.1.2" - "jsonfile" "^3.0.0" - "universalify" "^0.1.0" + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" -"get-caller-file@^2.0.1": - "integrity" "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" - "resolved" "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - "version" "2.0.5" +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -"graceful-fs@^4.1.2", "graceful-fs@^4.1.6": - "integrity" "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - "resolved" "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz" - "version" "4.2.4" +graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.2.4" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== "graceful-readlink@>= 1.0.0": - "integrity" "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" - "resolved" "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" - "version" "1.0.1" - -"handlebars@^4.7.6": - "integrity" "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==" - "resolved" "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz" - "version" "4.7.7" + version "1.0.1" + resolved "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= + +handlebars@^4.7.6: + version "4.7.7" + resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== dependencies: - "minimist" "^1.2.5" - "neo-async" "^2.6.0" - "source-map" "^0.6.1" - "wordwrap" "^1.0.0" + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" optionalDependencies: - "uglify-js" "^3.1.4" - -"has-flag@^4.0.0": - "integrity" "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - "resolved" "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - "version" "4.0.0" - -"is-fullwidth-code-point@^3.0.0": - "integrity" "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - "version" "3.0.0" - -"js-yaml@^3.13.1": - "integrity" "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==" - "resolved" "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz" - "version" "3.14.0" + uglify-js "^3.1.4" + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +js-yaml@^3.13.1: + version "3.14.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== dependencies: - "argparse" "^1.0.7" - "esprima" "^4.0.0" + argparse "^1.0.7" + esprima "^4.0.0" -"json-schema-ref-parser@^7.1.3": - "integrity" "sha512-AD7bvav0vak1/63w3jH8F7eHId/4E4EPdMAEZhGxtjktteUv9dnNB/cJy6nVnMyoTPBJnLwFK6tiQPSTeleCtQ==" - "resolved" "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-7.1.4.tgz" - "version" "7.1.4" +json-schema-ref-parser@^7.1.3: + version "7.1.4" + resolved "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-7.1.4.tgz" + integrity sha512-AD7bvav0vak1/63w3jH8F7eHId/4E4EPdMAEZhGxtjktteUv9dnNB/cJy6nVnMyoTPBJnLwFK6tiQPSTeleCtQ== dependencies: - "call-me-maybe" "^1.0.1" - "js-yaml" "^3.13.1" - "ono" "^6.0.0" - -"json-stable-stringify@1.0.1": - "integrity" "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=" - "resolved" "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" - "version" "1.0.1" + call-me-maybe "^1.0.1" + js-yaml "^3.13.1" + ono "^6.0.0" + +json-stable-stringify@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= dependencies: - "jsonify" "~0.0.0" + jsonify "~0.0.0" -"jsonfile@^3.0.0": - "integrity" "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=" - "resolved" "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz" - "version" "3.0.1" +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz" + integrity sha1-pezG9l9T9mLEQVx2daAzHQmS7GY= optionalDependencies: - "graceful-fs" "^4.1.6" + graceful-fs "^4.1.6" -"jsonify@~0.0.0": - "integrity" "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - "resolved" "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" - "version" "0.0.0" +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= -"locate-path@^5.0.0": - "integrity" "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==" - "resolved" "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - "version" "5.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: - "p-locate" "^4.1.0" - -"lodash.get@^4.4.2": - "integrity" "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" - "resolved" "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz" - "version" "4.4.2" - -"lodash.isequal@^4.5.0": - "integrity" "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" - "resolved" "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz" - "version" "4.5.0" - -"lodash@^4.17.15": - "integrity" "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - "resolved" "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - "version" "4.17.21" - -"minimist@^1.2.5": - "integrity" "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - "resolved" "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz" - "version" "1.2.5" - -"mkdirp@^0.5.1": - "integrity" "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==" - "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" - "version" "0.5.5" + p-locate "^4.1.0" + +lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + +lodash@^4.17.15: + version "4.17.21" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: - "minimist" "^1.2.5" + minimist "^1.2.5" -"neo-async@^2.6.0": - "integrity" "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" - "resolved" "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz" - "version" "2.6.1" +neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== -"node-fetch@^2.6.0": - "integrity" "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==" - "resolved" "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz" - "version" "2.6.7" +node-fetch@^2.6.0: + version "2.6.7" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== dependencies: - "whatwg-url" "^5.0.0" - -"ono@^6.0.0": - "integrity" "sha512-5rdYW/106kHqLeG22GE2MHKq+FlsxMERZev9DCzQX1zwkxnFwBivSn5i17a5O/rDmOJOdf4Wyt80UZljzx9+DA==" - "resolved" "https://registry.npmjs.org/ono/-/ono-6.0.1.tgz" - "version" "6.0.1" - -"openapi-schemas@^1.0.2": - "integrity" "sha512-KtMWcK2VtOS+nD8RKSIyScJsj8JrmVWcIX7Kjx4xEHijFYuvMTDON8WfeKOgeSb4uNG6UsqLj5Na7nKbSav9RQ==" - "resolved" "https://registry.npmjs.org/openapi-schemas/-/openapi-schemas-1.0.3.tgz" - "version" "1.0.3" - -"openapi-types@^1.3.5": - "integrity" "sha512-11oi4zYorsgvg5yBarZplAqbpev5HkuVNPlZaPTknPDzAynq+lnJdXAmruGWP0s+dNYZS7bjM+xrTpJw7184Fg==" - "resolved" "https://registry.npmjs.org/openapi-types/-/openapi-types-1.3.5.tgz" - "version" "1.3.5" - -"p-limit@^2.2.0": - "integrity" "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==" - "resolved" "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - "version" "2.3.0" + whatwg-url "^5.0.0" + +ono@^6.0.0: + version "6.0.1" + resolved "https://registry.npmjs.org/ono/-/ono-6.0.1.tgz" + integrity sha512-5rdYW/106kHqLeG22GE2MHKq+FlsxMERZev9DCzQX1zwkxnFwBivSn5i17a5O/rDmOJOdf4Wyt80UZljzx9+DA== + +openapi-schemas@^1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/openapi-schemas/-/openapi-schemas-1.0.3.tgz" + integrity sha512-KtMWcK2VtOS+nD8RKSIyScJsj8JrmVWcIX7Kjx4xEHijFYuvMTDON8WfeKOgeSb4uNG6UsqLj5Na7nKbSav9RQ== + +openapi-types@^1.3.5: + version "1.3.5" + resolved "https://registry.npmjs.org/openapi-types/-/openapi-types-1.3.5.tgz" + integrity sha512-11oi4zYorsgvg5yBarZplAqbpev5HkuVNPlZaPTknPDzAynq+lnJdXAmruGWP0s+dNYZS7bjM+xrTpJw7184Fg== + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: - "p-try" "^2.0.0" + p-try "^2.0.0" -"p-locate@^4.1.0": - "integrity" "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==" - "resolved" "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - "version" "4.1.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: - "p-limit" "^2.2.0" - -"p-try@^2.0.0": - "integrity" "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - "resolved" "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - "version" "2.2.0" - -"path-exists@^4.0.0": - "integrity" "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - "resolved" "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - "version" "4.0.0" - -"require-directory@^2.1.1": - "integrity" "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - "resolved" "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - "version" "2.1.1" - -"require-main-filename@^2.0.0": - "integrity" "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - "resolved" "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz" - "version" "2.0.0" - -"set-blocking@^2.0.0": - "integrity" "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - "resolved" "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - "version" "2.0.0" - -"source-map@^0.6.1": - "integrity" "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - "resolved" "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - "version" "0.6.1" - -"sprintf-js@~1.0.2": - "integrity" "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - "resolved" "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - "version" "1.0.3" - -"string-width@^4.1.0", "string-width@^4.2.0": - "integrity" "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==" - "resolved" "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz" - "version" "4.2.0" + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== dependencies: - "emoji-regex" "^8.0.0" - "is-fullwidth-code-point" "^3.0.0" - "strip-ansi" "^6.0.0" - -"strip-ansi@^6.0.0": - "integrity" "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==" - "resolved" "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz" - "version" "6.0.0" + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== dependencies: - "ansi-regex" "^5.0.0" + ansi-regex "^5.0.0" -"supports-color@^7.1.0": - "integrity" "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==" - "resolved" "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz" - "version" "7.1.0" +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== dependencies: - "has-flag" "^4.0.0" + has-flag "^4.0.0" -"swagger-cli@^2.3.0": - "integrity" "sha512-UL3S053zT0P9prYJj2zaiokER2KxJh2GWTJ12SbBAJZnlUKJrUZn3qK+zVc/i/bUcyrRRttA4cp8Lzk6cNm0nw==" - "resolved" "https://registry.npmjs.org/swagger-cli/-/swagger-cli-2.3.5.tgz" - "version" "2.3.5" +swagger-cli@^2.3.0: + version "2.3.5" + resolved "https://registry.npmjs.org/swagger-cli/-/swagger-cli-2.3.5.tgz" + integrity sha512-UL3S053zT0P9prYJj2zaiokER2KxJh2GWTJ12SbBAJZnlUKJrUZn3qK+zVc/i/bUcyrRRttA4cp8Lzk6cNm0nw== dependencies: - "chalk" "^3.0.0" - "js-yaml" "^3.13.1" - "mkdirp" "^0.5.1" - "swagger-parser" "^8.0.4" - "yargs" "^15.0.2" - -"swagger-methods@^2.0.1": - "integrity" "sha512-/RNqvBZkH8+3S/FqBPejHxJxZenaYq3MrpeXnzi06aDIS39Mqf5YCUNb/ZBjsvFFt8h9FxfKs8EXPtcYdfLiRg==" - "resolved" "https://registry.npmjs.org/swagger-methods/-/swagger-methods-2.0.2.tgz" - "version" "2.0.2" - -"swagger-parser@^8.0.4": - "integrity" "sha512-KGRdAaMJogSEB7sPKI31ptKIWX8lydEDAwWgB4pBMU7zys5cd54XNhoPSVlTxG/A3LphjX47EBn9j0dOGyzWbA==" - "resolved" "https://registry.npmjs.org/swagger-parser/-/swagger-parser-8.0.4.tgz" - "version" "8.0.4" + chalk "^3.0.0" + js-yaml "^3.13.1" + mkdirp "^0.5.1" + swagger-parser "^8.0.4" + yargs "^15.0.2" + +swagger-methods@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/swagger-methods/-/swagger-methods-2.0.2.tgz" + integrity sha512-/RNqvBZkH8+3S/FqBPejHxJxZenaYq3MrpeXnzi06aDIS39Mqf5YCUNb/ZBjsvFFt8h9FxfKs8EXPtcYdfLiRg== + +swagger-parser@^8.0.4: + version "8.0.4" + resolved "https://registry.npmjs.org/swagger-parser/-/swagger-parser-8.0.4.tgz" + integrity sha512-KGRdAaMJogSEB7sPKI31ptKIWX8lydEDAwWgB4pBMU7zys5cd54XNhoPSVlTxG/A3LphjX47EBn9j0dOGyzWbA== dependencies: - "call-me-maybe" "^1.0.1" - "json-schema-ref-parser" "^7.1.3" - "ono" "^6.0.0" - "openapi-schemas" "^1.0.2" - "openapi-types" "^1.3.5" - "swagger-methods" "^2.0.1" - "z-schema" "^4.2.2" - -"tr46@~0.0.3": - "integrity" "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - "resolved" "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" - "version" "0.0.3" - -"uglify-js@^3.1.4": - "integrity" "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==" - "resolved" "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz" - "version" "3.10.0" - -"universalify@^0.1.0": - "integrity" "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - "resolved" "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" - "version" "0.1.2" - -"validator@^13.6.0": - "integrity" "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==" - "resolved" "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz" - "version" "13.7.0" - -"webidl-conversions@^3.0.0": - "integrity" "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - "resolved" "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" - "version" "3.0.1" - -"whatwg-url@^5.0.0": - "integrity" "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=" - "resolved" "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" - "version" "5.0.0" + call-me-maybe "^1.0.1" + json-schema-ref-parser "^7.1.3" + ono "^6.0.0" + openapi-schemas "^1.0.2" + openapi-types "^1.3.5" + swagger-methods "^2.0.1" + z-schema "^4.2.2" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + +uglify-js@^3.1.4: + version "3.10.0" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz" + integrity sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +validator@^13.6.0: + version "13.7.0" + resolved "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz" + integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= dependencies: - "tr46" "~0.0.3" - "webidl-conversions" "^3.0.0" - -"which-module@^2.0.0": - "integrity" "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - "resolved" "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" - "version" "2.0.0" - -"wordwrap@^1.0.0": - "integrity" "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - "resolved" "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" - "version" "1.0.0" - -"wrap-ansi@^6.2.0": - "integrity" "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==" - "resolved" "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" - "version" "6.2.0" + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== dependencies: - "ansi-styles" "^4.0.0" - "string-width" "^4.1.0" - "strip-ansi" "^6.0.0" - -"y18n@^4.0.0": - "integrity" "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" - "resolved" "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz" - "version" "4.0.1" - -"yargs-parser@^18.1.1": - "integrity" "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==" - "resolved" "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz" - "version" "18.1.3" + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +y18n@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz" + integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== + +yargs-parser@^18.1.1: + version "18.1.3" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== dependencies: - "camelcase" "^5.0.0" - "decamelize" "^1.2.0" + camelcase "^5.0.0" + decamelize "^1.2.0" -"yargs@^15.0.2": - "integrity" "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==" - "resolved" "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz" - "version" "15.3.1" +yargs@^15.0.2: + version "15.3.1" + resolved "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz" + integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== dependencies: - "cliui" "^6.0.0" - "decamelize" "^1.2.0" - "find-up" "^4.1.0" - "get-caller-file" "^2.0.1" - "require-directory" "^2.1.1" - "require-main-filename" "^2.0.0" - "set-blocking" "^2.0.0" - "string-width" "^4.2.0" - "which-module" "^2.0.0" - "y18n" "^4.0.0" - "yargs-parser" "^18.1.1" - -"z-schema@^4.2.2": - "integrity" "sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w==" - "resolved" "https://registry.npmjs.org/z-schema/-/z-schema-4.2.4.tgz" - "version" "4.2.4" + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.1" + +z-schema@^4.2.2: + version "4.2.4" + resolved "https://registry.npmjs.org/z-schema/-/z-schema-4.2.4.tgz" + integrity sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w== dependencies: - "lodash.get" "^4.4.2" - "lodash.isequal" "^4.5.0" - "validator" "^13.6.0" + lodash.get "^4.4.2" + lodash.isequal "^4.5.0" + validator "^13.6.0" optionalDependencies: - "commander" "^2.7.1" + commander "^2.7.1" From 253482da665608f39f1f753677dccd25c05ec0a3 Mon Sep 17 00:00:00 2001 From: Brian Retterer Date: Wed, 16 Mar 2022 15:59:04 -0400 Subject: [PATCH 7/8] Fixes to generation to add in manually added code Updates to spec 2.11.1 Sets up copyright correctly --- okta/models/__init__.py | 4 ++ okta/models/access_policy.py | 2 +- okta/models/access_policy_constraint.py | 2 +- okta/models/access_policy_constraints.py | 2 +- okta/models/access_policy_rule.py | 2 +- okta/models/access_policy_rule_actions.py | 2 +- .../access_policy_rule_application_sign_on.py | 2 +- okta/models/access_policy_rule_conditions.py | 2 +- .../access_policy_rule_custom_condition.py | 2 +- okta/models/allowed_for_enum.py | 2 +- okta/models/application_feature.py | 2 +- okta/models/application_settings_notes.py | 2 +- okta/models/authenticator.py | 2 +- okta/models/authenticator_provider.py | 2 +- .../authenticator_provider_configuration.py | 2 +- ..._provider_configuration_user_name_plate.py | 2 +- okta/models/authenticator_settings.py | 2 +- okta/models/authenticator_status.py | 2 +- okta/models/authenticator_type.py | 2 +- okta/models/brand.py | 2 +- okta/models/capabilities_create_object.py | 2 +- okta/models/capabilities_object.py | 2 +- okta/models/capabilities_update_object.py | 2 +- okta/models/change_enum.py | 2 +- okta/models/channel_binding.py | 2 +- okta/models/compliance.py | 2 +- .../device_access_policy_rule_condition.py | 2 +- okta/models/dns_record.py | 2 +- okta/models/dns_record_type.py | 2 +- okta/models/domain.py | 2 +- okta/models/domain_certificate.py | 2 +- okta/models/domain_certificate_metadata.py | 2 +- okta/models/domain_certificate_source_type.py | 2 +- okta/models/domain_certificate_type.py | 2 +- okta/models/domain_list_response.py | 2 +- okta/models/domain_validation_status.py | 2 +- okta/models/email_template.py | 2 +- okta/models/email_template_content.py | 2 +- okta/models/email_template_customization.py | 2 +- .../email_template_customization_request.py | 2 +- okta/models/email_template_test_request.py | 2 +- .../email_template_touch_point_variant.py | 2 +- .../end_user_dashboard_touch_point_variant.py | 2 +- okta/models/error_page_touch_point_variant.py | 2 +- okta/models/factor_provider.py | 1 + okta/models/fips_enum.py | 2 +- okta/models/group_schema.py | 2 +- okta/models/group_schema_attribute.py | 2 +- okta/models/group_schema_base.py | 2 +- okta/models/group_schema_base_properties.py | 2 +- okta/models/group_schema_custom.py | 2 +- okta/models/group_schema_definitions.py | 2 +- .../identity_provider_credentials_signing.py | 10 +++- okta/models/idp_policy_rule_action.py | 51 +++++++++++++++++++ .../models/idp_policy_rule_action_provider.py | 49 ++++++++++++++++++ okta/models/image_upload_response.py | 2 +- okta/models/knowledge_constraint.py | 2 +- .../models/lifecycle_create_setting_object.py | 2 +- .../lifecycle_deactivate_setting_object.py | 2 +- okta/models/log_credential_provider.py | 1 + okta/models/notification_type.py | 2 +- okta/models/org_2_org_application.py | 2 +- okta/models/org_2_org_application_settings.py | 2 +- .../org_2_org_application_settings_app.py | 2 +- okta/models/org_contact_type.py | 2 +- okta/models/org_contact_type_obj.py | 2 +- okta/models/org_contact_user.py | 2 +- okta/models/org_okta_communication_setting.py | 2 +- okta/models/org_okta_support_setting.py | 2 +- okta/models/org_okta_support_settings_obj.py | 2 +- okta/models/org_preferences.py | 2 +- okta/models/org_setting.py | 2 +- okta/models/password_setting_object.py | 2 +- okta/models/policy_rule_actions.py | 16 ++++++ okta/models/possession_constraint.py | 2 +- okta/models/pre_registration_inline_hook.py | 2 +- okta/models/profile_enrollment_policy.py | 2 +- okta/models/profile_enrollment_policy_rule.py | 2 +- .../profile_enrollment_policy_rule_action.py | 2 +- .../profile_enrollment_policy_rule_actions.py | 2 +- ...ment_policy_rule_activation_requirement.py | 2 +- ...nrollment_policy_rule_profile_attribute.py | 2 +- okta/models/profile_setting_object.py | 2 +- okta/models/provisioning_connection.py | 2 +- .../provisioning_connection_auth_scheme.py | 2 +- .../models/provisioning_connection_profile.py | 2 +- .../models/provisioning_connection_request.py | 2 +- okta/models/provisioning_connection_status.py | 2 +- okta/models/required_enum.py | 2 +- okta/models/seed_enum.py | 2 +- .../sign_in_page_touch_point_variant.py | 2 +- okta/models/sign_on_inline_hook.py | 2 +- okta/models/subscription.py | 2 +- okta/models/subscription_status.py | 2 +- okta/models/theme.py | 2 +- okta/models/theme_response.py | 2 +- ...n_server_policy_rule_action_inline_hook.py | 2 +- okta/models/user_id_string.py | 2 +- okta/models/user_type_condition.py | 2 +- okta/models/user_verification_enum.py | 2 +- okta/models/verification_method.py | 2 +- okta/resource_clients/authenticator_client.py | 2 +- okta/resource_clients/brand_client.py | 27 ++++------ okta/resource_clients/org_client.py | 2 +- okta/resource_clients/subscription_client.py | 2 +- 105 files changed, 237 insertions(+), 116 deletions(-) create mode 100644 okta/models/idp_policy_rule_action.py create mode 100644 okta/models/idp_policy_rule_action_provider.py diff --git a/okta/models/__init__.py b/okta/models/__init__.py index 9f1b7398..72a73cc5 100644 --- a/okta/models/__init__.py +++ b/okta/models/__init__.py @@ -344,6 +344,10 @@ IdentityProviderPolicy = identity_provider_policy.IdentityProviderPolicy from okta.models import identity_provider_policy_rule_condition as identity_provider_policy_rule_condition IdentityProviderPolicyRuleCondition = identity_provider_policy_rule_condition.IdentityProviderPolicyRuleCondition +from okta.models import idp_policy_rule_action as idp_policy_rule_action +IdpPolicyRuleAction = idp_policy_rule_action.IdpPolicyRuleAction +from okta.models import idp_policy_rule_action_provider as idp_policy_rule_action_provider +IdpPolicyRuleActionProvider = idp_policy_rule_action_provider.IdpPolicyRuleActionProvider from okta.models import image_upload_response as image_upload_response ImageUploadResponse = image_upload_response.ImageUploadResponse from okta.models import inactivity_policy_rule_condition as inactivity_policy_rule_condition diff --git a/okta/models/access_policy.py b/okta/models/access_policy.py index c215f906..3fe4960f 100644 --- a/okta/models/access_policy.py +++ b/okta/models/access_policy.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/access_policy_constraint.py b/okta/models/access_policy_constraint.py index e6014899..d4b35700 100644 --- a/okta/models/access_policy_constraint.py +++ b/okta/models/access_policy_constraint.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/access_policy_constraints.py b/okta/models/access_policy_constraints.py index 2fcb84ba..8815c296 100644 --- a/okta/models/access_policy_constraints.py +++ b/okta/models/access_policy_constraints.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/access_policy_rule.py b/okta/models/access_policy_rule.py index ab290d82..141912dc 100644 --- a/okta/models/access_policy_rule.py +++ b/okta/models/access_policy_rule.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/access_policy_rule_actions.py b/okta/models/access_policy_rule_actions.py index 2635ff6e..2d03fd79 100644 --- a/okta/models/access_policy_rule_actions.py +++ b/okta/models/access_policy_rule_actions.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/access_policy_rule_application_sign_on.py b/okta/models/access_policy_rule_application_sign_on.py index 5c21f13b..31049b4a 100644 --- a/okta/models/access_policy_rule_application_sign_on.py +++ b/okta/models/access_policy_rule_application_sign_on.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/access_policy_rule_conditions.py b/okta/models/access_policy_rule_conditions.py index 9692eb83..29f952f1 100644 --- a/okta/models/access_policy_rule_conditions.py +++ b/okta/models/access_policy_rule_conditions.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/access_policy_rule_custom_condition.py b/okta/models/access_policy_rule_custom_condition.py index 3e0332da..a6383a31 100644 --- a/okta/models/access_policy_rule_custom_condition.py +++ b/okta/models/access_policy_rule_custom_condition.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/allowed_for_enum.py b/okta/models/allowed_for_enum.py index 1c890045..b8a75fd0 100644 --- a/okta/models/allowed_for_enum.py +++ b/okta/models/allowed_for_enum.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/application_feature.py b/okta/models/application_feature.py index bda5e648..a690221a 100644 --- a/okta/models/application_feature.py +++ b/okta/models/application_feature.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/application_settings_notes.py b/okta/models/application_settings_notes.py index 57c57128..5bc2a8f4 100644 --- a/okta/models/application_settings_notes.py +++ b/okta/models/application_settings_notes.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/authenticator.py b/okta/models/authenticator.py index 2425ffe4..3d513dab 100644 --- a/okta/models/authenticator.py +++ b/okta/models/authenticator.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/authenticator_provider.py b/okta/models/authenticator_provider.py index fa1b1444..17e73c3a 100644 --- a/okta/models/authenticator_provider.py +++ b/okta/models/authenticator_provider.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/authenticator_provider_configuration.py b/okta/models/authenticator_provider_configuration.py index da90466e..36d99a24 100644 --- a/okta/models/authenticator_provider_configuration.py +++ b/okta/models/authenticator_provider_configuration.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/authenticator_provider_configuration_user_name_plate.py b/okta/models/authenticator_provider_configuration_user_name_plate.py index be23be6d..c5b2f079 100644 --- a/okta/models/authenticator_provider_configuration_user_name_plate.py +++ b/okta/models/authenticator_provider_configuration_user_name_plate.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/authenticator_settings.py b/okta/models/authenticator_settings.py index ab3b29eb..a3bc56d4 100644 --- a/okta/models/authenticator_settings.py +++ b/okta/models/authenticator_settings.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/authenticator_status.py b/okta/models/authenticator_status.py index ae8dd776..313c5e71 100644 --- a/okta/models/authenticator_status.py +++ b/okta/models/authenticator_status.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/authenticator_type.py b/okta/models/authenticator_type.py index cfccd3a6..27a3bad6 100644 --- a/okta/models/authenticator_type.py +++ b/okta/models/authenticator_type.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/brand.py b/okta/models/brand.py index ebdbf5e0..fee492b9 100644 --- a/okta/models/brand.py +++ b/okta/models/brand.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/capabilities_create_object.py b/okta/models/capabilities_create_object.py index a0cabe21..88e7edcf 100644 --- a/okta/models/capabilities_create_object.py +++ b/okta/models/capabilities_create_object.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/capabilities_object.py b/okta/models/capabilities_object.py index 8c6cf344..c2dc5d17 100644 --- a/okta/models/capabilities_object.py +++ b/okta/models/capabilities_object.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/capabilities_update_object.py b/okta/models/capabilities_update_object.py index 6d48d444..c361ed48 100644 --- a/okta/models/capabilities_update_object.py +++ b/okta/models/capabilities_update_object.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/change_enum.py b/okta/models/change_enum.py index d3a32716..0c254b18 100644 --- a/okta/models/change_enum.py +++ b/okta/models/change_enum.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/channel_binding.py b/okta/models/channel_binding.py index c88b4f79..6bbaf557 100644 --- a/okta/models/channel_binding.py +++ b/okta/models/channel_binding.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/compliance.py b/okta/models/compliance.py index 62f56322..125faf29 100644 --- a/okta/models/compliance.py +++ b/okta/models/compliance.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/device_access_policy_rule_condition.py b/okta/models/device_access_policy_rule_condition.py index 702b2e61..be6ffc40 100644 --- a/okta/models/device_access_policy_rule_condition.py +++ b/okta/models/device_access_policy_rule_condition.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/dns_record.py b/okta/models/dns_record.py index c167b25a..99ef7fb4 100644 --- a/okta/models/dns_record.py +++ b/okta/models/dns_record.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/dns_record_type.py b/okta/models/dns_record_type.py index f36df543..1c5775a5 100644 --- a/okta/models/dns_record_type.py +++ b/okta/models/dns_record_type.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/domain.py b/okta/models/domain.py index ebe0eb71..0d3a025c 100644 --- a/okta/models/domain.py +++ b/okta/models/domain.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/domain_certificate.py b/okta/models/domain_certificate.py index 657b3785..3ab2a7e5 100644 --- a/okta/models/domain_certificate.py +++ b/okta/models/domain_certificate.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/domain_certificate_metadata.py b/okta/models/domain_certificate_metadata.py index 5303582f..cbe9d461 100644 --- a/okta/models/domain_certificate_metadata.py +++ b/okta/models/domain_certificate_metadata.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/domain_certificate_source_type.py b/okta/models/domain_certificate_source_type.py index 8b2f6ef1..a7c4bcbd 100644 --- a/okta/models/domain_certificate_source_type.py +++ b/okta/models/domain_certificate_source_type.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/domain_certificate_type.py b/okta/models/domain_certificate_type.py index 83768089..cbbf8a0a 100644 --- a/okta/models/domain_certificate_type.py +++ b/okta/models/domain_certificate_type.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/domain_list_response.py b/okta/models/domain_list_response.py index a43f5706..2600584b 100644 --- a/okta/models/domain_list_response.py +++ b/okta/models/domain_list_response.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/domain_validation_status.py b/okta/models/domain_validation_status.py index 85a1d5ae..262ed988 100644 --- a/okta/models/domain_validation_status.py +++ b/okta/models/domain_validation_status.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/email_template.py b/okta/models/email_template.py index cd2dacbf..6ded4f55 100644 --- a/okta/models/email_template.py +++ b/okta/models/email_template.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/email_template_content.py b/okta/models/email_template_content.py index 76944868..66103dd1 100644 --- a/okta/models/email_template_content.py +++ b/okta/models/email_template_content.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/email_template_customization.py b/okta/models/email_template_customization.py index b004b630..d94a8f4f 100644 --- a/okta/models/email_template_customization.py +++ b/okta/models/email_template_customization.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/email_template_customization_request.py b/okta/models/email_template_customization_request.py index 31d565a8..8b44d94d 100644 --- a/okta/models/email_template_customization_request.py +++ b/okta/models/email_template_customization_request.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/email_template_test_request.py b/okta/models/email_template_test_request.py index a81ce039..5d7f8227 100644 --- a/okta/models/email_template_test_request.py +++ b/okta/models/email_template_test_request.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/email_template_touch_point_variant.py b/okta/models/email_template_touch_point_variant.py index f38113ce..68be5c18 100644 --- a/okta/models/email_template_touch_point_variant.py +++ b/okta/models/email_template_touch_point_variant.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/end_user_dashboard_touch_point_variant.py b/okta/models/end_user_dashboard_touch_point_variant.py index e986e5b1..ef806700 100644 --- a/okta/models/end_user_dashboard_touch_point_variant.py +++ b/okta/models/end_user_dashboard_touch_point_variant.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/error_page_touch_point_variant.py b/okta/models/error_page_touch_point_variant.py index 211f8048..4a45b9ea 100644 --- a/okta/models/error_page_touch_point_variant.py +++ b/okta/models/error_page_touch_point_variant.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/factor_provider.py b/okta/models/factor_provider.py index db6d7f23..a801f5d2 100644 --- a/okta/models/factor_provider.py +++ b/okta/models/factor_provider.py @@ -37,3 +37,4 @@ class FactorProvider( DUO = "DUO", "duo" YUBICO = "YUBICO", "yubico" CUSTOM = "CUSTOM", "custom" + APPLE = "APPLE", "apple" diff --git a/okta/models/fips_enum.py b/okta/models/fips_enum.py index a1a6b58d..c69ed47d 100644 --- a/okta/models/fips_enum.py +++ b/okta/models/fips_enum.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/group_schema.py b/okta/models/group_schema.py index 3a65efed..c38bfec7 100644 --- a/okta/models/group_schema.py +++ b/okta/models/group_schema.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/group_schema_attribute.py b/okta/models/group_schema_attribute.py index 5f7b0921..866ad62f 100644 --- a/okta/models/group_schema_attribute.py +++ b/okta/models/group_schema_attribute.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/group_schema_base.py b/okta/models/group_schema_base.py index 9e3ceaaf..ac829f74 100644 --- a/okta/models/group_schema_base.py +++ b/okta/models/group_schema_base.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/group_schema_base_properties.py b/okta/models/group_schema_base_properties.py index 783affee..f925f4ff 100644 --- a/okta/models/group_schema_base_properties.py +++ b/okta/models/group_schema_base_properties.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/group_schema_custom.py b/okta/models/group_schema_custom.py index ce155066..7dae1837 100644 --- a/okta/models/group_schema_custom.py +++ b/okta/models/group_schema_custom.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/group_schema_definitions.py b/okta/models/group_schema_definitions.py index 8a2a2283..5c1adc1e 100644 --- a/okta/models/group_schema_definitions.py +++ b/okta/models/group_schema_definitions.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/identity_provider_credentials_signing.py b/okta/models/identity_provider_credentials_signing.py index 31831346..490148d0 100644 --- a/okta/models/identity_provider_credentials_signing.py +++ b/okta/models/identity_provider_credentials_signing.py @@ -33,13 +33,21 @@ def __init__(self, config=None): if config: self.kid = config["kid"]\ if "kid" in config else None + self.private_key = config["privateKey"]\ + if "privateKey" in config else None + self.team_id = config["teamId"]\ + if "teamId" in config else None else: self.kid = None + self.private_key = None + self.team_id = None def request_format(self): parent_req_format = super().request_format() current_obj_format = { - "kid": self.kid + "kid": self.kid, + "privateKey": self.private_key, + "teamId": self.team_id } parent_req_format.update(current_obj_format) return parent_req_format diff --git a/okta/models/idp_policy_rule_action.py b/okta/models/idp_policy_rule_action.py new file mode 100644 index 00000000..52343d90 --- /dev/null +++ b/okta/models/idp_policy_rule_action.py @@ -0,0 +1,51 @@ +# flake8: noqa +""" +Copyright 2020 - Present Okta, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY +# SEE CONTRIBUTOR DOCUMENTATION + +from okta.okta_object import OktaObject +from okta.okta_collection import OktaCollection +from okta.models import idp_policy_rule_action_provider\ + as idp_policy_rule_action_provider + + +class IdpPolicyRuleAction( + OktaObject +): + """ + A class for IdpPolicyRuleAction objects. + """ + + def __init__(self, config=None): + super().__init__(config) + if config: + self.providers = OktaCollection.form_list( + config["providers"] if "providers"\ + in config else [], + idp_policy_rule_action_provider.IdpPolicyRuleActionProvider + ) + else: + self.providers = [] + + def request_format(self): + parent_req_format = super().request_format() + current_obj_format = { + "providers": self.providers + } + parent_req_format.update(current_obj_format) + return parent_req_format diff --git a/okta/models/idp_policy_rule_action_provider.py b/okta/models/idp_policy_rule_action_provider.py new file mode 100644 index 00000000..a1b30b7e --- /dev/null +++ b/okta/models/idp_policy_rule_action_provider.py @@ -0,0 +1,49 @@ +# flake8: noqa +""" +Copyright 2020 - Present Okta, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY +# SEE CONTRIBUTOR DOCUMENTATION + +from okta.okta_object import OktaObject + + +class IdpPolicyRuleActionProvider( + OktaObject +): + """ + A class for IdpPolicyRuleActionProvider objects. + """ + + def __init__(self, config=None): + super().__init__(config) + if config: + self.id = config["id"]\ + if "id" in config else None + self.type = config["type"]\ + if "type" in config else None + else: + self.id = None + self.type = None + + def request_format(self): + parent_req_format = super().request_format() + current_obj_format = { + "id": self.id, + "type": self.type + } + parent_req_format.update(current_obj_format) + return parent_req_format diff --git a/okta/models/image_upload_response.py b/okta/models/image_upload_response.py index 5b585c93..c8880a74 100644 --- a/okta/models/image_upload_response.py +++ b/okta/models/image_upload_response.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/knowledge_constraint.py b/okta/models/knowledge_constraint.py index a1bbe713..98ba5a56 100644 --- a/okta/models/knowledge_constraint.py +++ b/okta/models/knowledge_constraint.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/lifecycle_create_setting_object.py b/okta/models/lifecycle_create_setting_object.py index 8bd6e1d0..56bc924d 100644 --- a/okta/models/lifecycle_create_setting_object.py +++ b/okta/models/lifecycle_create_setting_object.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/lifecycle_deactivate_setting_object.py b/okta/models/lifecycle_deactivate_setting_object.py index 22e5f509..6cb9b5cc 100644 --- a/okta/models/lifecycle_deactivate_setting_object.py +++ b/okta/models/lifecycle_deactivate_setting_object.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/log_credential_provider.py b/okta/models/log_credential_provider.py index 21cde10d..0381cc08 100644 --- a/okta/models/log_credential_provider.py +++ b/okta/models/log_credential_provider.py @@ -36,3 +36,4 @@ class LogCredentialProvider( GOOGLE = "GOOGLE", "google" DUO = "DUO", "duo" YUBIKEY = "YUBIKEY", "yubikey" + APPLE = "APPLE", "apple" diff --git a/okta/models/notification_type.py b/okta/models/notification_type.py index 60cb0b41..d3f90cce 100644 --- a/okta/models/notification_type.py +++ b/okta/models/notification_type.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_2_org_application.py b/okta/models/org_2_org_application.py index 8aaec386..ef40710e 100644 --- a/okta/models/org_2_org_application.py +++ b/okta/models/org_2_org_application.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_2_org_application_settings.py b/okta/models/org_2_org_application_settings.py index a91bbd7f..76fb437c 100644 --- a/okta/models/org_2_org_application_settings.py +++ b/okta/models/org_2_org_application_settings.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_2_org_application_settings_app.py b/okta/models/org_2_org_application_settings_app.py index 1167454c..0954a10c 100644 --- a/okta/models/org_2_org_application_settings_app.py +++ b/okta/models/org_2_org_application_settings_app.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_contact_type.py b/okta/models/org_contact_type.py index 47677614..d3001c06 100644 --- a/okta/models/org_contact_type.py +++ b/okta/models/org_contact_type.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_contact_type_obj.py b/okta/models/org_contact_type_obj.py index d7980f38..9f8f3cae 100644 --- a/okta/models/org_contact_type_obj.py +++ b/okta/models/org_contact_type_obj.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_contact_user.py b/okta/models/org_contact_user.py index 4e0e3db6..b29320ef 100644 --- a/okta/models/org_contact_user.py +++ b/okta/models/org_contact_user.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_okta_communication_setting.py b/okta/models/org_okta_communication_setting.py index 42002c82..9bafc06e 100644 --- a/okta/models/org_okta_communication_setting.py +++ b/okta/models/org_okta_communication_setting.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_okta_support_setting.py b/okta/models/org_okta_support_setting.py index 0b59ad89..1c7fe112 100644 --- a/okta/models/org_okta_support_setting.py +++ b/okta/models/org_okta_support_setting.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_okta_support_settings_obj.py b/okta/models/org_okta_support_settings_obj.py index ffd1bc74..5a25fe1e 100644 --- a/okta/models/org_okta_support_settings_obj.py +++ b/okta/models/org_okta_support_settings_obj.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_preferences.py b/okta/models/org_preferences.py index 0daf9199..8ab13bdd 100644 --- a/okta/models/org_preferences.py +++ b/okta/models/org_preferences.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/org_setting.py b/okta/models/org_setting.py index da486db3..248ff2e5 100644 --- a/okta/models/org_setting.py +++ b/okta/models/org_setting.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/password_setting_object.py b/okta/models/password_setting_object.py index e83f76a7..acac5765 100644 --- a/okta/models/password_setting_object.py +++ b/okta/models/password_setting_object.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/policy_rule_actions.py b/okta/models/policy_rule_actions.py index 56880620..2841c4e8 100644 --- a/okta/models/policy_rule_actions.py +++ b/okta/models/policy_rule_actions.py @@ -21,6 +21,8 @@ from okta.okta_object import OktaObject from okta.models import policy_rule_actions_enroll\ as policy_rule_actions_enroll +from okta.models import idp_policy_rule_action\ + as idp_policy_rule_action from okta.models import password_policy_rule_action\ as password_policy_rule_action from okta.models import okta_sign_on_policy_rule_signon_actions\ @@ -49,6 +51,18 @@ def __init__(self, config=None): self.enroll = None else: self.enroll = None + if "idp" in config: + if isinstance(config["idp"], + idp_policy_rule_action.IdpPolicyRuleAction): + self.idp = config["idp"] + elif config["idp"] is not None: + self.idp = idp_policy_rule_action.IdpPolicyRuleAction( + config["idp"] + ) + else: + self.idp = None + else: + self.idp = None if "passwordChange" in config: if isinstance(config["passwordChange"], password_policy_rule_action.PasswordPolicyRuleAction): @@ -99,6 +113,7 @@ def __init__(self, config=None): self.signon = None else: self.enroll = None + self.idp = None self.password_change = None self.self_service_password_reset = None self.self_service_unlock = None @@ -108,6 +123,7 @@ def request_format(self): parent_req_format = super().request_format() current_obj_format = { "enroll": self.enroll, + "idp": self.idp, "passwordChange": self.password_change, "selfServicePasswordReset": self.self_service_password_reset, "selfServiceUnlock": self.self_service_unlock, diff --git a/okta/models/possession_constraint.py b/okta/models/possession_constraint.py index b16b0ab5..0925c2fd 100644 --- a/okta/models/possession_constraint.py +++ b/okta/models/possession_constraint.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/pre_registration_inline_hook.py b/okta/models/pre_registration_inline_hook.py index c7b67171..af7e584f 100644 --- a/okta/models/pre_registration_inline_hook.py +++ b/okta/models/pre_registration_inline_hook.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/profile_enrollment_policy.py b/okta/models/profile_enrollment_policy.py index ff1bfee6..4ec1bf7a 100644 --- a/okta/models/profile_enrollment_policy.py +++ b/okta/models/profile_enrollment_policy.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/profile_enrollment_policy_rule.py b/okta/models/profile_enrollment_policy_rule.py index 76deda7c..9643469e 100644 --- a/okta/models/profile_enrollment_policy_rule.py +++ b/okta/models/profile_enrollment_policy_rule.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/profile_enrollment_policy_rule_action.py b/okta/models/profile_enrollment_policy_rule_action.py index 4901c51c..240f3674 100644 --- a/okta/models/profile_enrollment_policy_rule_action.py +++ b/okta/models/profile_enrollment_policy_rule_action.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/profile_enrollment_policy_rule_actions.py b/okta/models/profile_enrollment_policy_rule_actions.py index 56d9d3f0..33c58139 100644 --- a/okta/models/profile_enrollment_policy_rule_actions.py +++ b/okta/models/profile_enrollment_policy_rule_actions.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/profile_enrollment_policy_rule_activation_requirement.py b/okta/models/profile_enrollment_policy_rule_activation_requirement.py index 7cc01b5d..d8b64caf 100644 --- a/okta/models/profile_enrollment_policy_rule_activation_requirement.py +++ b/okta/models/profile_enrollment_policy_rule_activation_requirement.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/profile_enrollment_policy_rule_profile_attribute.py b/okta/models/profile_enrollment_policy_rule_profile_attribute.py index 6cd49472..864855a7 100644 --- a/okta/models/profile_enrollment_policy_rule_profile_attribute.py +++ b/okta/models/profile_enrollment_policy_rule_profile_attribute.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/profile_setting_object.py b/okta/models/profile_setting_object.py index bc420a93..29adac3a 100644 --- a/okta/models/profile_setting_object.py +++ b/okta/models/profile_setting_object.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/provisioning_connection.py b/okta/models/provisioning_connection.py index ea9f7006..14f95791 100644 --- a/okta/models/provisioning_connection.py +++ b/okta/models/provisioning_connection.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/provisioning_connection_auth_scheme.py b/okta/models/provisioning_connection_auth_scheme.py index e1d5d9f6..cfdb88bb 100644 --- a/okta/models/provisioning_connection_auth_scheme.py +++ b/okta/models/provisioning_connection_auth_scheme.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/provisioning_connection_profile.py b/okta/models/provisioning_connection_profile.py index 03a7e3eb..ae77493b 100644 --- a/okta/models/provisioning_connection_profile.py +++ b/okta/models/provisioning_connection_profile.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/provisioning_connection_request.py b/okta/models/provisioning_connection_request.py index 8881c09a..9f83ac82 100644 --- a/okta/models/provisioning_connection_request.py +++ b/okta/models/provisioning_connection_request.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/provisioning_connection_status.py b/okta/models/provisioning_connection_status.py index 4cfa3924..87621141 100644 --- a/okta/models/provisioning_connection_status.py +++ b/okta/models/provisioning_connection_status.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/required_enum.py b/okta/models/required_enum.py index 6034d03d..27fbe500 100644 --- a/okta/models/required_enum.py +++ b/okta/models/required_enum.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/seed_enum.py b/okta/models/seed_enum.py index 2fd351ba..d5c9602a 100644 --- a/okta/models/seed_enum.py +++ b/okta/models/seed_enum.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/sign_in_page_touch_point_variant.py b/okta/models/sign_in_page_touch_point_variant.py index 9dc4c9e4..85ccc726 100644 --- a/okta/models/sign_in_page_touch_point_variant.py +++ b/okta/models/sign_in_page_touch_point_variant.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/sign_on_inline_hook.py b/okta/models/sign_on_inline_hook.py index 9158342d..f952b129 100644 --- a/okta/models/sign_on_inline_hook.py +++ b/okta/models/sign_on_inline_hook.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/subscription.py b/okta/models/subscription.py index 4953fa9c..5dca3ba4 100644 --- a/okta/models/subscription.py +++ b/okta/models/subscription.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/subscription_status.py b/okta/models/subscription_status.py index a7d64e45..8c363f2f 100644 --- a/okta/models/subscription_status.py +++ b/okta/models/subscription_status.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/theme.py b/okta/models/theme.py index 690bfdf8..cb6fc789 100644 --- a/okta/models/theme.py +++ b/okta/models/theme.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/theme_response.py b/okta/models/theme_response.py index a4649e42..3c8c930d 100644 --- a/okta/models/theme_response.py +++ b/okta/models/theme_response.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/token_authorization_server_policy_rule_action_inline_hook.py b/okta/models/token_authorization_server_policy_rule_action_inline_hook.py index 4f487e4d..6f097db9 100644 --- a/okta/models/token_authorization_server_policy_rule_action_inline_hook.py +++ b/okta/models/token_authorization_server_policy_rule_action_inline_hook.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/user_id_string.py b/okta/models/user_id_string.py index 03451de7..2fac6f32 100644 --- a/okta/models/user_id_string.py +++ b/okta/models/user_id_string.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/user_type_condition.py b/okta/models/user_type_condition.py index 3f985678..d00f512f 100644 --- a/okta/models/user_type_condition.py +++ b/okta/models/user_type_condition.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/user_verification_enum.py b/okta/models/user_verification_enum.py index 57f99745..6b89b2c3 100644 --- a/okta/models/user_verification_enum.py +++ b/okta/models/user_verification_enum.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/models/verification_method.py b/okta/models/verification_method.py index ea33acd9..8a0761ca 100644 --- a/okta/models/verification_method.py +++ b/okta/models/verification_method.py @@ -1,6 +1,6 @@ # flake8: noqa """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/resource_clients/authenticator_client.py b/okta/resource_clients/authenticator_client.py index 79b87911..94f5388d 100644 --- a/okta/resource_clients/authenticator_client.py +++ b/okta/resource_clients/authenticator_client.py @@ -1,5 +1,5 @@ """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/resource_clients/brand_client.py b/okta/resource_clients/brand_client.py index 1ce42a43..e90f2761 100644 --- a/okta/resource_clients/brand_client.py +++ b/okta/resource_clients/brand_client.py @@ -1,5 +1,5 @@ """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -682,17 +682,14 @@ async def send_test_email( """ Send a test email to the current users primary and seco ndary email addresses. The email content is selected ba - sed on the following priority: - An email customization specifically for the users loc - ale. - The default language of email customizations. - The email templates default content. + sed on the following priority: An email customization s + pecifically for the users locale. The default language + of email customizations. The email templates default co + ntent. Args: brand_id {str} template_name {str} {email_template_test_request} - Returns: - EmailTemplateContent """ http_method = "post".upper() api_url = format_url(f""" @@ -716,21 +713,15 @@ async def send_test_email( ) if error: - return (None, None, error) + return (None, error) response, error = await self._request_executor\ - .execute(request, EmailTemplateContent) + .execute(request) if error: - return (None, response, error) + return (response, error) - try: - result = EmailTemplateContent( - self.form_response_body(response.get_body()) - ) - except Exception as error: - return (None, response, error) - return (result, response, None) + return (response, None) async def list_brand_themes( self, brandId, diff --git a/okta/resource_clients/org_client.py b/okta/resource_clients/org_client.py index 9caddd54..db995ae1 100644 --- a/okta/resource_clients/org_client.py +++ b/okta/resource_clients/org_client.py @@ -1,5 +1,5 @@ """ -Copyright 2021 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/okta/resource_clients/subscription_client.py b/okta/resource_clients/subscription_client.py index b3ded0bf..c2a6a7a6 100644 --- a/okta/resource_clients/subscription_client.py +++ b/okta/resource_clients/subscription_client.py @@ -1,5 +1,5 @@ """ -Copyright 2022 - Present Okta, Inc. +Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From e393bcfe7302d50140587c31e05503ef47525144 Mon Sep 17 00:00:00 2001 From: Brian Retterer Date: Wed, 16 Mar 2022 16:05:58 -0400 Subject: [PATCH 8/8] Prep for 2.5.0 release --- CHANGELOG.md | 16 ++++++++++++++++ okta/__init__.py | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b58b581..bd3c6f8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Okta Python SDK Changelog +## v2.5.0 +- Regenerate code using the [open API spec v2.11.1](https://github.com/okta/okta-management-openapi-spec/releases/tag/openapi-2.11.1) +- Updates client template to persist aiohttp and related logic +- Fixed copyright headers which had the incorrect starting year + +_New resources:_ +* Brand + +_New models:_ +* EmailTemplate +* EmailTemplateContent +* EmailTemplateCustomization +* EmailTemplateCustomizationRequest +* EmailTemplateTestTrequest +* IdpPolicyRuleAction +* IdpPolicyRuleActionProvider ## v2.4.0 - Regenerate code using the [open API spec v2.10.0](https://github.com/okta/okta-management-openapi-spec/releases/tag/openapi-2.10.0). - Allow possibility to re-use http session. diff --git a/okta/__init__.py b/okta/__init__.py index ba9b9133..e59b17b4 100644 --- a/okta/__init__.py +++ b/okta/__init__.py @@ -1 +1 @@ -__version__ = '2.4.0' +__version__ = '2.5.0'