├── .circleci └── config.yml ├── .github └── workflows │ └── python-package.yml ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── LONG_DESCRIPTION.md ├── MANIFEST.in ├── Makefile ├── README.md ├── okta ├── __init__.py ├── api_client.py ├── api_response.py ├── cache │ ├── __init__.py │ ├── cache.py │ ├── no_op_cache.py │ └── okta_cache.py ├── client.py ├── config │ ├── __init__.py │ ├── config_setter.py │ └── config_validator.py ├── constants.py ├── error_messages.py ├── errors │ ├── __init__.py │ ├── error.py │ ├── http_error.py │ └── okta_api_error.py ├── exceptions │ ├── __init__.py │ └── exceptions.py ├── helpers.py ├── http_client.py ├── jwt.py ├── logger.py ├── models │ ├── __init__.py │ ├── access_policy.py │ ├── access_policy_constraint.py │ ├── access_policy_constraints.py │ ├── access_policy_rule.py │ ├── access_policy_rule_actions.py │ ├── access_policy_rule_application_sign_on.py │ ├── access_policy_rule_conditions.py │ ├── access_policy_rule_custom_condition.py │ ├── acs_endpoint.py │ ├── activate_factor_request.py │ ├── allowed_for_enum.py │ ├── app_and_instance_condition_evaluator_app_or_instance.py │ ├── app_and_instance_policy_rule_condition.py │ ├── app_instance_policy_rule_condition.py │ ├── app_link.py │ ├── app_user.py │ ├── app_user_credentials.py │ ├── app_user_password_credential.py │ ├── application.py │ ├── application_accessibility.py │ ├── application_credentials.py │ ├── application_credentials_o_auth_client.py │ ├── application_credentials_scheme.py │ ├── application_credentials_signing.py │ ├── application_credentials_signing_use.py │ ├── application_credentials_username_template.py │ ├── application_feature.py │ ├── application_group_assignment.py │ ├── application_licensing.py │ ├── application_settings.py │ ├── application_settings_application.py │ ├── application_settings_notes.py │ ├── application_settings_notifications.py │ ├── application_settings_notifications_vpn.py │ ├── application_settings_notifications_vpn_network.py │ ├── application_sign_on_mode.py │ ├── application_visibility.py │ ├── application_visibility_hide.py │ ├── assign_role_request.py │ ├── authentication_provider.py │ ├── authentication_provider_type.py │ ├── authenticator.py │ ├── authenticator_provider.py │ ├── authenticator_provider_configuration.py │ ├── authenticator_provider_configuration_user_name_plate.py │ ├── authenticator_settings.py │ ├── authenticator_status.py │ ├── authenticator_type.py │ ├── authorization_server.py │ ├── authorization_server_credentials.py │ ├── authorization_server_credentials_rotation_mode.py │ ├── authorization_server_credentials_signing_config.py │ ├── authorization_server_credentials_use.py │ ├── authorization_server_policy.py │ ├── authorization_server_policy_rule.py │ ├── authorization_server_policy_rule_actions.py │ ├── authorization_server_policy_rule_conditions.py │ ├── auto_login_application.py │ ├── auto_login_application_settings.py │ ├── auto_login_application_settings_sign_on.py │ ├── basic_application_settings.py │ ├── basic_application_settings_application.py │ ├── basic_auth_application.py │ ├── before_scheduled_action_policy_rule_condition.py │ ├── bookmark_application.py │ ├── bookmark_application_settings.py │ ├── bookmark_application_settings_application.py │ ├── brand.py │ ├── browser_plugin_application.py │ ├── call_user_factor.py │ ├── call_user_factor_profile.py │ ├── capabilities_create_object.py │ ├── capabilities_object.py │ ├── capabilities_update_object.py │ ├── catalog_application.py │ ├── catalog_application_status.py │ ├── change_enum.py │ ├── change_password_request.py │ ├── channel_binding.py │ ├── client_policy_condition.py │ ├── client_secret.py │ ├── client_secret_metadata.py │ ├── compliance.py │ ├── context_policy_rule_condition.py │ ├── create_session_request.py │ ├── create_user_request.py │ ├── csr.py │ ├── csr_metadata.py │ ├── csr_metadata_subject.py │ ├── csr_metadata_subject_alt_names.py │ ├── custom_hotp_user_factor.py │ ├── custom_hotp_user_factor_profile.py │ ├── device_access_policy_rule_condition.py │ ├── device_policy_rule_condition.py │ ├── device_policy_rule_condition_platform.py │ ├── dns_record.py │ ├── dns_record_type.py │ ├── domain.py │ ├── domain_certificate.py │ ├── domain_certificate_metadata.py │ ├── domain_certificate_source_type.py │ ├── domain_certificate_type.py │ ├── domain_list_response.py │ ├── domain_validation_status.py │ ├── duration.py │ ├── email_template.py │ ├── email_template_content.py │ ├── email_template_customization.py │ ├── email_template_customization_request.py │ ├── email_template_test_request.py │ ├── email_template_touch_point_variant.py │ ├── email_user_factor.py │ ├── email_user_factor_profile.py │ ├── enabled_status.py │ ├── end_user_dashboard_touch_point_variant.py │ ├── error_page_touch_point_variant.py │ ├── event_hook.py │ ├── event_hook_channel.py │ ├── event_hook_channel_config.py │ ├── event_hook_channel_config_auth_scheme.py │ ├── event_hook_channel_config_auth_scheme_type.py │ ├── event_hook_channel_config_header.py │ ├── event_subscriptions.py │ ├── factor_provider.py │ ├── factor_result_type.py │ ├── factor_status.py │ ├── factor_type.py │ ├── feature.py │ ├── feature_stage.py │ ├── feature_stage_state.py │ ├── feature_stage_value.py │ ├── feature_type.py │ ├── fips_enum.py │ ├── forgot_password_response.py │ ├── grant_type_policy_rule_condition.py │ ├── group.py │ ├── group_condition.py │ ├── group_policy_rule_condition.py │ ├── group_profile.py │ ├── group_rule.py │ ├── group_rule_action.py │ ├── group_rule_conditions.py │ ├── group_rule_expression.py │ ├── group_rule_group_assignment.py │ ├── group_rule_group_condition.py │ ├── group_rule_people_condition.py │ ├── group_rule_status.py │ ├── group_rule_user_condition.py │ ├── group_schema.py │ ├── group_schema_attribute.py │ ├── group_schema_base.py │ ├── group_schema_base_properties.py │ ├── group_schema_custom.py │ ├── group_schema_definitions.py │ ├── group_type.py │ ├── hardware_user_factor.py │ ├── hardware_user_factor_profile.py │ ├── identity_provider.py │ ├── identity_provider_application_user.py │ ├── identity_provider_credentials.py │ ├── identity_provider_credentials_client.py │ ├── identity_provider_credentials_signing.py │ ├── identity_provider_credentials_trust.py │ ├── identity_provider_policy.py │ ├── identity_provider_policy_rule_condition.py │ ├── idp_policy_rule_action.py │ ├── idp_policy_rule_action_provider.py │ ├── iframe_embed_scope_allowed_apps.py │ ├── image_upload_response.py │ ├── inactivity_policy_rule_condition.py │ ├── inline_hook.py │ ├── inline_hook_channel.py │ ├── inline_hook_channel_config.py │ ├── inline_hook_channel_config_auth_scheme.py │ ├── inline_hook_channel_config_headers.py │ ├── inline_hook_payload.py │ ├── inline_hook_response.py │ ├── inline_hook_response_command_value.py │ ├── inline_hook_response_commands.py │ ├── inline_hook_status.py │ ├── inline_hook_type.py │ ├── ion_field.py │ ├── ion_form.py │ ├── json_web_key.py │ ├── jwk_use.py │ ├── knowledge_constraint.py │ ├── lifecycle_create_setting_object.py │ ├── lifecycle_deactivate_setting_object.py │ ├── lifecycle_expiration_policy_rule_condition.py │ ├── linked_object.py │ ├── linked_object_details.py │ ├── linked_object_details_type.py │ ├── log_actor.py │ ├── log_authentication_context.py │ ├── log_authentication_provider.py │ ├── log_client.py │ ├── log_credential_provider.py │ ├── log_credential_type.py │ ├── log_debug_context.py │ ├── log_event.py │ ├── log_geographical_context.py │ ├── log_geolocation.py │ ├── log_ip_address.py │ ├── log_issuer.py │ ├── log_outcome.py │ ├── log_request.py │ ├── log_security_context.py │ ├── log_severity.py │ ├── log_target.py │ ├── log_transaction.py │ ├── log_user_agent.py │ ├── mdm_enrollment_policy_rule_condition.py │ ├── multifactor_enrollment_policy.py │ ├── multifactor_enrollment_policy_authenticator_settings.py │ ├── multifactor_enrollment_policy_authenticator_status.py │ ├── multifactor_enrollment_policy_authenticator_type.py │ ├── multifactor_enrollment_policy_settings.py │ ├── multifactor_enrollment_policy_settings_type.py │ ├── network_zone.py │ ├── network_zone_address.py │ ├── network_zone_address_type.py │ ├── network_zone_location.py │ ├── network_zone_status.py │ ├── network_zone_type.py │ ├── network_zone_usage.py │ ├── notification_type.py │ ├── o_auth_2_actor.py │ ├── o_auth_2_claim.py │ ├── o_auth_2_claim_conditions.py │ ├── o_auth_2_client.py │ ├── o_auth_2_refresh_token.py │ ├── o_auth_2_scope.py │ ├── o_auth_2_scope_consent_grant.py │ ├── o_auth_2_scope_consent_grant_source.py │ ├── o_auth_2_scope_consent_grant_status.py │ ├── o_auth_2_scopes_mediation_policy_rule_condition.py │ ├── o_auth_2_token.py │ ├── o_auth_application_credentials.py │ ├── o_auth_authorization_policy.py │ ├── o_auth_endpoint_authentication_method.py │ ├── o_auth_grant_type.py │ ├── o_auth_response_type.py │ ├── okta_sign_on_policy.py │ ├── okta_sign_on_policy_conditions.py │ ├── okta_sign_on_policy_rule.py │ ├── okta_sign_on_policy_rule_actions.py │ ├── okta_sign_on_policy_rule_conditions.py │ ├── okta_sign_on_policy_rule_signon_actions.py │ ├── okta_sign_on_policy_rule_signon_session_actions.py │ ├── open_id_connect_application.py │ ├── open_id_connect_application_consent_method.py │ ├── open_id_connect_application_idp_initiated_login.py │ ├── open_id_connect_application_issuer_mode.py │ ├── open_id_connect_application_settings.py │ ├── open_id_connect_application_settings_client.py │ ├── open_id_connect_application_settings_client_keys.py │ ├── open_id_connect_application_settings_refresh_token.py │ ├── open_id_connect_application_type.py │ ├── open_id_connect_refresh_token_rotation_type.py │ ├── org_2_org_application.py │ ├── org_2_org_application_settings.py │ ├── org_2_org_application_settings_app.py │ ├── org_contact_type.py │ ├── org_contact_type_obj.py │ ├── org_contact_user.py │ ├── org_okta_communication_setting.py │ ├── org_okta_support_setting.py │ ├── org_okta_support_settings_obj.py │ ├── org_preferences.py │ ├── org_setting.py │ ├── password_credential.py │ ├── password_credential_hash.py │ ├── password_credential_hash_algorithm.py │ ├── password_credential_hook.py │ ├── password_dictionary.py │ ├── password_dictionary_common.py │ ├── password_expiration_policy_rule_condition.py │ ├── password_policy.py │ ├── password_policy_authentication_provider_condition.py │ ├── password_policy_conditions.py │ ├── password_policy_delegation_settings.py │ ├── password_policy_delegation_settings_options.py │ ├── password_policy_password_settings.py │ ├── password_policy_password_settings_age.py │ ├── password_policy_password_settings_complexity.py │ ├── password_policy_password_settings_lockout.py │ ├── password_policy_recovery_email.py │ ├── password_policy_recovery_email_properties.py │ ├── password_policy_recovery_email_recovery_token.py │ ├── password_policy_recovery_factor_settings.py │ ├── password_policy_recovery_factors.py │ ├── password_policy_recovery_question.py │ ├── password_policy_recovery_question_complexity.py │ ├── password_policy_recovery_question_properties.py │ ├── password_policy_recovery_settings.py │ ├── password_policy_rule.py │ ├── password_policy_rule_action.py │ ├── password_policy_rule_actions.py │ ├── password_policy_rule_conditions.py │ ├── password_policy_settings.py │ ├── password_setting_object.py │ ├── platform_condition_evaluator_platform.py │ ├── platform_condition_evaluator_platform_operating_system.py │ ├── platform_condition_evaluator_platform_operating_system_version.py │ ├── platform_policy_rule_condition.py │ ├── policy.py │ ├── policy_account_link.py │ ├── policy_account_link_filter.py │ ├── policy_account_link_filter_groups.py │ ├── policy_network_condition.py │ ├── policy_people_condition.py │ ├── policy_rule.py │ ├── policy_rule_actions.py │ ├── policy_rule_actions_enroll.py │ ├── policy_rule_actions_enroll_self.py │ ├── policy_rule_auth_context_condition.py │ ├── policy_rule_conditions.py │ ├── policy_subject.py │ ├── policy_subject_match_type.py │ ├── policy_type.py │ ├── policy_user_name_template.py │ ├── possession_constraint.py │ ├── pre_registration_inline_hook.py │ ├── profile_enrollment_policy.py │ ├── profile_enrollment_policy_rule.py │ ├── profile_enrollment_policy_rule_action.py │ ├── profile_enrollment_policy_rule_actions.py │ ├── profile_enrollment_policy_rule_activation_requirement.py │ ├── profile_enrollment_policy_rule_profile_attribute.py │ ├── profile_mapping.py │ ├── profile_mapping_property.py │ ├── profile_mapping_property_push_status.py │ ├── profile_mapping_source.py │ ├── profile_setting_object.py │ ├── protocol.py │ ├── protocol_algorithm_type.py │ ├── protocol_algorithm_type_signature.py │ ├── protocol_algorithms.py │ ├── protocol_endpoint.py │ ├── protocol_endpoints.py │ ├── protocol_relay_state.py │ ├── protocol_relay_state_format.py │ ├── protocol_settings.py │ ├── provisioning.py │ ├── provisioning_conditions.py │ ├── provisioning_connection.py │ ├── provisioning_connection_auth_scheme.py │ ├── provisioning_connection_profile.py │ ├── provisioning_connection_request.py │ ├── provisioning_connection_status.py │ ├── provisioning_deprovisioned_condition.py │ ├── provisioning_groups.py │ ├── provisioning_suspended_condition.py │ ├── push_user_factor.py │ ├── push_user_factor_profile.py │ ├── recovery_question_credential.py │ ├── required_enum.py │ ├── reset_password_token.py │ ├── response_links.py │ ├── risk_policy_rule_condition.py │ ├── risk_score_policy_rule_condition.py │ ├── role.py │ ├── role_assignment_type.py │ ├── role_status.py │ ├── role_type.py │ ├── saml_application.py │ ├── saml_application_settings.py │ ├── saml_application_settings_sign_on.py │ ├── saml_attribute_statement.py │ ├── scheduled_user_lifecycle_action.py │ ├── scheme_application_credentials.py │ ├── scope.py │ ├── scope_type.py │ ├── secure_password_store_application.py │ ├── secure_password_store_application_settings.py │ ├── secure_password_store_application_settings_application.py │ ├── security_question.py │ ├── security_question_user_factor.py │ ├── security_question_user_factor_profile.py │ ├── seed_enum.py │ ├── session.py │ ├── session_authentication_method.py │ ├── session_identity_provider.py │ ├── session_identity_provider_type.py │ ├── session_status.py │ ├── sign_in_page_touch_point_variant.py │ ├── sign_on_inline_hook.py │ ├── single_logout.py │ ├── sms_template.py │ ├── sms_template_translations.py │ ├── sms_template_type.py │ ├── sms_user_factor.py │ ├── sms_user_factor_profile.py │ ├── social_auth_token.py │ ├── sp_certificate.py │ ├── subscription.py │ ├── subscription_status.py │ ├── swa_application.py │ ├── swa_application_settings.py │ ├── swa_application_settings_application.py │ ├── swa_three_field_application.py │ ├── swa_three_field_application_settings.py │ ├── swa_three_field_application_settings_application.py │ ├── temp_password.py │ ├── theme.py │ ├── theme_response.py │ ├── threat_insight_configuration.py │ ├── token_authorization_server_policy_rule_action.py │ ├── token_authorization_server_policy_rule_action_inline_hook.py │ ├── token_user_factor.py │ ├── token_user_factor_profile.py │ ├── totp_user_factor.py │ ├── totp_user_factor_profile.py │ ├── trusted_origin.py │ ├── u_2_f_user_factor.py │ ├── u_2_f_user_factor_profile.py │ ├── user.py │ ├── user_activation_token.py │ ├── user_condition.py │ ├── user_credentials.py │ ├── user_factor.py │ ├── user_id_string.py │ ├── user_identifier_condition_evaluator_pattern.py │ ├── user_identifier_policy_rule_condition.py │ ├── user_identity_provider_link_request.py │ ├── user_lifecycle_attribute_policy_rule_condition.py │ ├── user_next_login.py │ ├── user_policy_rule_condition.py │ ├── user_profile.py │ ├── user_schema.py │ ├── user_schema_attribute.py │ ├── user_schema_attribute_enum.py │ ├── user_schema_attribute_items.py │ ├── user_schema_attribute_master.py │ ├── user_schema_attribute_master_priority.py │ ├── user_schema_attribute_master_type.py │ ├── user_schema_attribute_permission.py │ ├── user_schema_attribute_scope.py │ ├── user_schema_attribute_type.py │ ├── user_schema_attribute_union.py │ ├── user_schema_base.py │ ├── user_schema_base_properties.py │ ├── user_schema_definitions.py │ ├── user_schema_properties.py │ ├── user_schema_properties_profile.py │ ├── user_schema_properties_profile_item.py │ ├── user_schema_public.py │ ├── user_status.py │ ├── user_status_policy_rule_condition.py │ ├── user_type.py │ ├── user_type_condition.py │ ├── user_verification_enum.py │ ├── verification_method.py │ ├── verify_factor_request.py │ ├── verify_user_factor_response.py │ ├── web_authn_user_factor.py │ ├── web_authn_user_factor_profile.py │ ├── web_user_factor.py │ ├── web_user_factor_profile.py │ ├── ws_federation_application.py │ ├── ws_federation_application_settings.py │ └── ws_federation_application_settings_application.py ├── oauth.py ├── okta_collection.py ├── okta_object.py ├── request_executor.py ├── resource_clients │ ├── __init__.py │ ├── application_client.py │ ├── authenticator_client.py │ ├── authorization_server_client.py │ ├── brand_client.py │ ├── domain_client.py │ ├── event_hook_client.py │ ├── feature_client.py │ ├── group_client.py │ ├── group_schema_client.py │ ├── identity_provider_client.py │ ├── inline_hook_client.py │ ├── linked_object_client.py │ ├── log_event_client.py │ ├── network_zone_client.py │ ├── org_client.py │ ├── policy_client.py │ ├── profile_mapping_client.py │ ├── session_client.py │ ├── sms_template_client.py │ ├── subscription_client.py │ ├── threat_insight_client.py │ ├── trusted_origin_client.py │ ├── user_client.py │ ├── user_factor_client.py │ ├── user_schema_client.py │ └── user_type_client.py ├── user_agent.py └── utils.py ├── openapi ├── package.json ├── templates │ ├── README.md │ ├── client.py.hbs │ ├── constants.py.hbs │ ├── index.js │ ├── model.py.hbs │ ├── models-init.py.hbs │ ├── partials │ │ ├── copyrightHeader.hbs │ │ └── models │ │ │ └── defaultMethod.py.hbs │ └── resource_client.py.hbs └── yarn.lock ├── pip-install.sh ├── regen.sh ├── requirements.txt ├── run_unit_tests.sh ├── setup.cfg ├── setup.py ├── tests ├── README.md ├── __init__.py ├── conftest.py ├── integration │ ├── cassettes │ │ ├── test_applications_it │ │ │ ├── TestApplicationsResource.test_activate_deactivate_delete_app.yaml │ │ │ ├── TestApplicationsResource.test_app_remove_assigned_user.yaml │ │ │ ├── TestApplicationsResource.test_app_update_assigned_user.yaml │ │ │ ├── TestApplicationsResource.test_assign_group_app.yaml │ │ │ ├── TestApplicationsResource.test_assign_user_app.yaml │ │ │ ├── TestApplicationsResource.test_clone_app_key.yaml │ │ │ ├── TestApplicationsResource.test_create_SWA_app.yaml │ │ │ ├── TestApplicationsResource.test_create_SWA_three_app.yaml │ │ │ ├── TestApplicationsResource.test_create_basic_auth_app.yaml │ │ │ ├── TestApplicationsResource.test_create_bookmark_app.yaml │ │ │ ├── TestApplicationsResource.test_create_open_id_connect_app.yaml │ │ │ ├── TestApplicationsResource.test_create_secure_password_store_app.yaml │ │ │ ├── TestApplicationsResource.test_generate_app_key.yaml │ │ │ ├── TestApplicationsResource.test_generate_csr.yaml │ │ │ ├── TestApplicationsResource.test_get_app_keys.yaml │ │ │ ├── TestApplicationsResource.test_get_consent_grant.yaml │ │ │ ├── TestApplicationsResource.test_get_csr.yaml │ │ │ ├── TestApplicationsResource.test_get_default_provisioning_connection_for_application.yaml │ │ │ ├── TestApplicationsResource.test_get_list_assign_users_app.yaml │ │ │ ├── TestApplicationsResource.test_grant_consent_to_scope.yaml │ │ │ ├── TestApplicationsResource.test_list_app_keys.yaml │ │ │ ├── TestApplicationsResource.test_list_apps.yaml │ │ │ ├── TestApplicationsResource.test_list_assign_group_app.yaml │ │ │ ├── TestApplicationsResource.test_remove_assign_group_app.yaml │ │ │ ├── TestApplicationsResource.test_revoke_consent_grant.yaml │ │ │ └── TestApplicationsResource.test_revoke_csr.yaml │ │ ├── test_auth_server_it │ │ │ ├── TestAuthorizationServerResource.test_activate_server.yaml │ │ │ ├── TestAuthorizationServerResource.test_create_auth_server.yaml │ │ │ ├── TestAuthorizationServerResource.test_create_get_oauth2_claim.yaml │ │ │ ├── TestAuthorizationServerResource.test_create_get_oauth2_scope.yaml │ │ │ ├── TestAuthorizationServerResource.test_delete_auth_server_policy.yaml │ │ │ ├── TestAuthorizationServerResource.test_delete_oauth2_claim.yaml │ │ │ ├── TestAuthorizationServerResource.test_delete_oauth2_scope.yaml │ │ │ ├── TestAuthorizationServerResource.test_get_auth_server_policy.yaml │ │ │ ├── TestAuthorizationServerResource.test_get_created_auth_server.yaml │ │ │ ├── TestAuthorizationServerResource.test_list_auth_server_keys.yaml │ │ │ ├── TestAuthorizationServerResource.test_list_auth_server_policies.yaml │ │ │ ├── TestAuthorizationServerResource.test_list_auth_servers.yaml │ │ │ ├── TestAuthorizationServerResource.test_list_authorization_server_policy_rules.yaml │ │ │ ├── TestAuthorizationServerResource.test_list_oauth2_claims.yaml │ │ │ ├── TestAuthorizationServerResource.test_list_oauth2_scopes.yaml │ │ │ ├── TestAuthorizationServerResource.test_rotate_auth_server_keys.yaml │ │ │ ├── TestAuthorizationServerResource.test_update_auth_server.yaml │ │ │ ├── TestAuthorizationServerResource.test_update_auth_server_policy.yaml │ │ │ ├── TestAuthorizationServerResource.test_update_deactivate_delete_server.yaml │ │ │ ├── TestAuthorizationServerResource.test_update_oauth2_claim.yaml │ │ │ └── TestAuthorizationServerResource.test_update_oauth2_scope.yaml │ │ ├── test_authenticators_it │ │ │ ├── TestAuthenticatorsResource.test_activate_and_deactivate_authenticator.yaml │ │ │ ├── TestAuthenticatorsResource.test_get_authenticator.yaml │ │ │ ├── TestAuthenticatorsResource.test_list_authenticators.yaml │ │ │ └── TestAuthenticatorsResource.test_update_authenticator.yaml │ │ ├── test_brands_it │ │ │ ├── TestBrandsResource.test_create_delete_email_template_customizations.yaml │ │ │ ├── TestBrandsResource.test_delete_brand_theme_background_image.yaml │ │ │ ├── TestBrandsResource.test_delete_brand_theme_favicon.yaml │ │ │ ├── TestBrandsResource.test_delete_brand_theme_logo.yaml │ │ │ ├── TestBrandsResource.test_get_brand.yaml │ │ │ ├── TestBrandsResource.test_get_brand_theme.yaml │ │ │ ├── TestBrandsResource.test_get_email_template.yaml │ │ │ ├── TestBrandsResource.test_get_email_template_customization_preview.yaml │ │ │ ├── TestBrandsResource.test_get_update_email_template_customization.yaml │ │ │ ├── TestBrandsResource.test_list_brand_themes.yaml │ │ │ ├── TestBrandsResource.test_list_brands.yaml │ │ │ ├── TestBrandsResource.test_list_email_template_customizations.yaml │ │ │ ├── TestBrandsResource.test_list_email_templates.yaml │ │ │ ├── TestBrandsResource.test_update_brand.yaml │ │ │ └── TestBrandsResource.test_update_brand_theme.yaml │ │ ├── test_domains_it │ │ │ ├── TestDomainResource.test_create_and_delete_domain.yaml │ │ │ ├── TestDomainResource.test_get_domain.yaml │ │ │ └── TestDomainResource.test_list_domains.yaml │ │ ├── test_event_hooks_it │ │ │ ├── TestEventHooksResource.test_activate_event_hook.yaml │ │ │ ├── TestEventHooksResource.test_create_get_event_hook.yaml │ │ │ ├── TestEventHooksResource.test_deactivate_event_hook.yaml │ │ │ ├── TestEventHooksResource.test_delete_event_hook.yaml │ │ │ ├── TestEventHooksResource.test_list_event_hooks.yaml │ │ │ └── TestEventHooksResource.test_update_event_hook.yaml │ │ ├── test_factors_it │ │ │ ├── TestFactorsResource.test_delete_factor.yaml │ │ │ ├── TestFactorsResource.test_enroll_sms_factor.yaml │ │ │ ├── TestFactorsResource.test_get_factor.yaml │ │ │ └── TestFactorsResource.test_list_factors_new_user.yaml │ │ ├── test_features_it │ │ │ ├── TestFeaturesResource.test_get_feature.yaml │ │ │ ├── TestFeaturesResource.test_list_feature_dependencies.yaml │ │ │ ├── TestFeaturesResource.test_list_feature_dependents.yaml │ │ │ └── TestFeaturesResource.test_list_features.yaml │ │ ├── test_group_schema_it │ │ │ ├── TestGroupSchemaResource.test_add_and_remove_custom_attribute.yaml │ │ │ ├── TestGroupSchemaResource.test_get_group_schema.yaml │ │ │ └── TestGroupSchemaResource.test_update_custom_attribute.yaml │ │ ├── test_groups_it │ │ │ ├── TestGroupsResource.test_create_get_group.yaml │ │ │ ├── TestGroupsResource.test_group_assigned_applications.yaml │ │ │ ├── TestGroupsResource.test_group_profile_custom_attributes.yaml │ │ │ ├── TestGroupsResource.test_group_roles_operations.yaml │ │ │ ├── TestGroupsResource.test_group_rule_operations.yaml │ │ │ ├── TestGroupsResource.test_group_target_add.yaml │ │ │ ├── TestGroupsResource.test_group_target_remove.yaml │ │ │ ├── TestGroupsResource.test_group_users_operations.yaml │ │ │ ├── TestGroupsResource.test_list_groups.yaml │ │ │ ├── TestGroupsResource.test_remove_group.yaml │ │ │ ├── TestGroupsResource.test_search_group.yaml │ │ │ └── TestGroupsResource.test_update_group.yaml │ │ ├── test_identity_providers │ │ │ ├── TestIdentityProvidersResource.test_activate_deactivate_idp.yaml │ │ │ ├── TestIdentityProvidersResource.test_add_get_facebook_idp.yaml │ │ │ ├── TestIdentityProvidersResource.test_add_get_generic_idp.yaml │ │ │ ├── TestIdentityProvidersResource.test_add_get_linkedin_idp.yaml │ │ │ ├── TestIdentityProvidersResource.test_clone_idp_signing_key.yaml │ │ │ ├── TestIdentityProvidersResource.test_create_get_key.yaml │ │ │ ├── TestIdentityProvidersResource.test_delete_idp.yaml │ │ │ ├── TestIdentityProvidersResource.test_delete_key.yaml │ │ │ ├── TestIdentityProvidersResource.test_generate_get_csr.yaml │ │ │ ├── TestIdentityProvidersResource.test_generate_get_idp_signing_key.yaml │ │ │ ├── TestIdentityProvidersResource.test_list_idp_signing_keys.yaml │ │ │ ├── TestIdentityProvidersResource.test_list_idps.yaml │ │ │ ├── TestIdentityProvidersResource.test_list_keys.yaml │ │ │ ├── TestIdentityProvidersResource.test_revoke_csr.yaml │ │ │ └── TestIdentityProvidersResource.test_update_idp.yaml │ │ ├── test_inline_hooks_it │ │ │ ├── TestInlineHooksResource.test_activate_deactivate_inline_hook.yaml │ │ │ ├── TestInlineHooksResource.test_create_get_inline_hook.yaml │ │ │ ├── TestInlineHooksResource.test_delete_inline_hook.yaml │ │ │ ├── TestInlineHooksResource.test_list_inline_hooks.yaml │ │ │ └── TestInlineHooksResource.test_update_inline_hook.yaml │ │ ├── test_linked_objects_it │ │ │ ├── TestLinkedObjectsResource.test_add_get_linked_object.yaml │ │ │ ├── TestLinkedObjectsResource.test_delete_linked_object.yaml │ │ │ └── TestLinkedObjectsResource.test_get_all_linked_objects.yaml │ │ ├── test_network_zone_it │ │ │ ├── TestNetworkZoneResource.test_create_and_delete_network_zone.yaml │ │ │ ├── TestNetworkZoneResource.test_list_network_zones.yaml │ │ │ └── TestNetworkZoneResource.test_update_network_zone.yaml │ │ ├── test_org_it │ │ │ ├── TestOrgResource.test_extend_okta_support.yaml │ │ │ ├── TestOrgResource.test_get_okta_communication_settings.yaml │ │ │ ├── TestOrgResource.test_get_okta_support_settings.yaml │ │ │ ├── TestOrgResource.test_get_org_contact_types.yaml │ │ │ ├── TestOrgResource.test_get_org_contact_user.yaml │ │ │ ├── TestOrgResource.test_get_org_preferences.yaml │ │ │ ├── TestOrgResource.test_get_org_settings.yaml │ │ │ ├── TestOrgResource.test_grant_revoke_okta_support.yaml │ │ │ ├── TestOrgResource.test_hide_okta_ui_footer.yaml │ │ │ ├── TestOrgResource.test_opt_in_users_to_okta_communication_emails.yaml │ │ │ ├── TestOrgResource.test_opt_out_users_from_okta_communication_emails.yaml │ │ │ ├── TestOrgResource.test_partial_setting_update.yaml │ │ │ ├── TestOrgResource.test_setting_update.yaml │ │ │ ├── TestOrgResource.test_show_okta_ui_footer.yaml │ │ │ └── TestOrgResource.test_update_org_contact_user.yaml │ │ ├── test_policies_it │ │ │ ├── TestPoliciesResource.test_activate_deactivate_policy.yaml │ │ │ ├── TestPoliciesResource.test_activate_deactivate_policy_rule.yaml │ │ │ ├── TestPoliciesResource.test_create_get_password_policy_rule.yaml │ │ │ ├── TestPoliciesResource.test_create_get_policy.yaml │ │ │ ├── TestPoliciesResource.test_create_get_sign_on_policy.yaml │ │ │ ├── TestPoliciesResource.test_create_get_sign_on_policy_rule.yaml │ │ │ ├── TestPoliciesResource.test_create_get_sign_on_policy_with_group_conditions.yaml │ │ │ ├── TestPoliciesResource.test_create_password_policy.yaml │ │ │ ├── TestPoliciesResource.test_delete_policy.yaml │ │ │ ├── TestPoliciesResource.test_delete_policy_rules.yaml │ │ │ ├── TestPoliciesResource.test_list_policies_by_type.yaml │ │ │ ├── TestPoliciesResource.test_list_policy_rules.yaml │ │ │ ├── TestPoliciesResource.test_update_policy.yaml │ │ │ └── TestPoliciesResource.test_update_policy_rule.yaml │ │ ├── test_subscription_it │ │ │ ├── TestSubscriptionResource.test_get_role_subscription_by_notification_type.yaml │ │ │ ├── TestSubscriptionResource.test_list_role_subsription.yaml │ │ │ ├── TestSubscriptionResource.test_subscribe_unsubscribe_role_by_notification_type.yaml │ │ │ └── TestSubscriptionResource.test_subscribe_unsubscribe_user.yaml │ │ ├── test_templates_it │ │ │ ├── TestTemplatesResource.test_create_get_sms_template.yaml │ │ │ ├── TestTemplatesResource.test_create_list_sms_templates.yaml │ │ │ ├── TestTemplatesResource.test_delete_sms_template.yaml │ │ │ ├── TestTemplatesResource.test_partial_update_sms_template.yaml │ │ │ └── TestTemplatesResource.test_update_sms_template.yaml │ │ ├── test_threat_insight_it │ │ │ ├── TestThreatInsightConfiguration.test_get_threat_insight_configuration.yaml │ │ │ └── TestThreatInsightConfiguration.test_update_threat_insight_configuration.yaml │ │ ├── test_trusted_origins_it │ │ │ ├── TestTrustedOriginsResource.test_activate_deactivate_origin.yaml │ │ │ ├── TestTrustedOriginsResource.test_create_get_origin.yaml │ │ │ ├── TestTrustedOriginsResource.test_delete_origin.yaml │ │ │ ├── TestTrustedOriginsResource.test_list_origins.yaml │ │ │ └── TestTrustedOriginsResource.test_update_origin.yaml │ │ ├── test_user_schema_it │ │ │ ├── TestUserSchemaResource.test_get_user_schema.yaml │ │ │ └── TestUserSchemaResource.test_update_user_profile.yaml │ │ ├── test_user_types_it │ │ │ ├── TestUserTypesResource.test_create_user_type.yaml │ │ │ ├── TestUserTypesResource.test_delete_user_type.yaml │ │ │ ├── TestUserTypesResource.test_get_user_type.yaml │ │ │ ├── TestUserTypesResource.test_list_user_types.yaml │ │ │ ├── TestUserTypesResource.test_replace_user_type.yaml │ │ │ └── TestUserTypesResource.test_update_user_type.yaml │ │ └── test_users_it │ │ │ ├── TestUsersResource.test_activate_user.yaml │ │ │ ├── TestUsersResource.test_assign_user_to_role.yaml │ │ │ ├── TestUsersResource.test_change_recovery_question.yaml │ │ │ ├── TestUsersResource.test_change_user_password.yaml │ │ │ ├── TestUsersResource.test_create_get_user.yaml │ │ │ ├── TestUsersResource.test_expire_password_get_temporary.yaml │ │ │ ├── TestUsersResource.test_get_reset_password_link_for_user.yaml │ │ │ ├── TestUsersResource.test_list_user_subscriptions.yaml │ │ │ ├── TestUsersResource.test_suspend_user.yaml │ │ │ ├── TestUsersResource.test_update_user_profile.yaml │ │ │ ├── TestUsersResource.test_user_group_target_to_role.yaml │ │ │ └── TestUsersResource.test_user_pagination.yaml │ ├── data │ │ ├── brand_theme_background.png │ │ ├── brand_theme_favicon.ico │ │ ├── brand_theme_logo.png │ │ └── logo.png │ ├── test_applications_it.py │ ├── test_auth_server_it.py │ ├── test_authenticators_it.py │ ├── test_brands_it.py │ ├── test_domains_it.py │ ├── test_event_hooks_it.py │ ├── test_factors_it.py │ ├── test_features_it.py │ ├── test_group_schema_it.py │ ├── test_groups_it.py │ ├── test_identity_providers.py │ ├── test_inline_hooks_it.py │ ├── test_linked_objects_it.py │ ├── test_log_events_it.py │ ├── test_network_zone_it.py │ ├── test_org_it.py │ ├── test_policies_it.py │ ├── test_subscription_it.py │ ├── test_templates_it.py │ ├── test_threat_insight_it.py │ ├── test_trusted_origins_it.py │ ├── test_user_schema_it.py │ ├── test_user_types_it.py │ └── test_users_it.py ├── mocks.py ├── unit │ ├── cassettes │ │ ├── test_client_error_call_SSWS.yaml │ │ ├── test_client_error_call_oauth.yaml │ │ ├── test_client_success_call_SSWS.yaml │ │ ├── test_create_group_different_inputs[group_obj0].yaml │ │ ├── test_create_group_different_inputs[group_obj1].yaml │ │ ├── test_create_group_different_inputs[group_obj2].yaml │ │ ├── test_http_client │ │ │ ├── test_client_error_call_SSWS.yaml │ │ │ ├── test_client_error_call_oauth.yaml │ │ │ ├── test_client_success_call_SSWS.yaml │ │ │ └── test_client_success_call_oauth.yaml │ │ └── test_models │ │ │ ├── test_create_group_different_inputs[group_obj0].yaml │ │ │ ├── test_create_group_different_inputs[group_obj1].yaml │ │ │ └── test_create_group_different_inputs[group_obj2].yaml │ ├── files │ │ ├── PK-sample-global.yaml │ │ ├── PK-sample-local.yaml │ │ ├── SSWS-sample-global.yaml │ │ └── SSWS-sample-local.yaml │ ├── test_api_response.py │ ├── test_applications_ut.py │ ├── test_cache.py │ ├── test_client.py │ ├── test_config_setter.py │ ├── test_config_validator.py │ ├── test_constants.py │ ├── test_domains.py │ ├── test_helpers.py │ ├── test_http_client.py │ ├── test_jwt.py │ ├── test_logger.py │ ├── test_models.py │ ├── test_oauth.py │ ├── test_oauth_clear_access_token.py │ ├── test_request_executor.py │ ├── test_retry_logic.py │ ├── test_sign_on_modes.py │ ├── test_user_profile.py │ ├── test_user_schema.py │ └── test_utils.py └── utils.py └── tox.ini /.github/workflows/python-package.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions 3 | 4 | name: Python package 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: Set up Python ${{ matrix.python-version }} 24 | uses: actions/setup-python@v2 25 | with: 26 | python-version: ${{ matrix.python-version }} 27 | - name: Install dependencies 28 | run: | 29 | python -m pip install --upgrade pip 30 | python -m pip install flake8 pytest 31 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 32 | - name: Lint with flake8 33 | run: | 34 | # stop the build if there are Python syntax errors or undefined names 35 | flake8 okta/ --count --select=E9,F63,F7,F82 --show-source --statistics 36 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide 37 | flake8 okta/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 38 | - name: Unit test with pytest 39 | run: | 40 | pytest tests/unit 41 | - name: Integration test with pytest 42 | run: | 43 | pytest tests/integration 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE generated files 2 | .vscode/ 3 | 4 | # Python generated files 5 | __pycache__/ 6 | *.pyc 7 | .pytest_cache 8 | 9 | # Packaging generated files 10 | *.egg-info 11 | 12 | # Tox 13 | .tox 14 | 15 | # Code coverage 16 | .coverage 17 | 18 | # JS files 19 | */node_modules/ 20 | *package-lock.json 21 | 22 | # Build files 23 | build/ 24 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | python: 4 | - "3.7" 5 | - "3.8" 6 | - "3.9" 7 | - "3.10-dev" 8 | 9 | install: 10 | - pip install -U importlib_metadata 11 | - pip install -U -r requirements.txt 12 | 13 | script: 14 | - echo "Running tests in job stages..." 15 | 16 | jobs: 17 | include: 18 | - stage: test 19 | python: 3.8 20 | name: "Unit Tests" 21 | script: 22 | - echo "Running unit tests..." 23 | - pytest tests/unit/ 24 | name: "Integration Tests" 25 | script: 26 | - echo "Running integration tests..." 27 | - pytest tests/integration/ 28 | - stage: code_style_test 29 | name: "Flake8 Check" 30 | script: 31 | - echo "Code Style check..." 32 | - "flake8 --extend-ignore=E501 okta/" 33 | -------------------------------------------------------------------------------- /LONG_DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | Okta SDK Python 2 | =============== 3 | 4 | A Python library for the Okta Management APIs. 5 | 6 | Getting Started 7 | --------------- 8 | ``` $ pip install okta ``` 9 | 10 | What you need 11 | -------------------- 12 | 13 | - An Okta account, called an _organization_ (sign up for a free developer organization if you need one) 14 | - [An API token](https://developer.okta.com/docs/api/getting_started/getting_a_token) 15 | 16 | Look for our quickstart guide here! 17 | - https://github.com/okta/okta-sdk-python 18 | 19 | Okta Developer Forum 20 | -------------------- 21 | 22 | Find out more and look for help here: https://devforum.okta.com/ -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include CHANGELOG.md LICENSE.md README.md LONG_DESCRIPTION.md tox.ini requirements.txt 2 | recursive-include tests * -------------------------------------------------------------------------------- /okta/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '2.9.13' 2 | -------------------------------------------------------------------------------- /okta/api_client.py: -------------------------------------------------------------------------------- 1 | from pydash.strings import camel_case 2 | 3 | 4 | class APIClient(): 5 | """ 6 | A base class for the Okta API Clients. 7 | """ 8 | 9 | def __init__(self): 10 | pass 11 | 12 | @staticmethod 13 | def form_response_body(body: dict): 14 | """ 15 | Method to verify the response body from the Okta API before 16 | passing it into the constructor. 17 | 18 | Args: 19 | body (dict): Okta API response body 20 | """ 21 | result = {} 22 | for key, val in body.items(): 23 | if val is None: 24 | continue 25 | if not isinstance(val, dict): 26 | result[camel_case(key)] = val 27 | else: 28 | result[camel_case(key)] = APIClient.form_response_body(val) 29 | return result 30 | -------------------------------------------------------------------------------- /okta/cache/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/okta/cache/__init__.py -------------------------------------------------------------------------------- /okta/cache/no_op_cache.py: -------------------------------------------------------------------------------- 1 | from okta.cache.cache import Cache 2 | 3 | 4 | class NoOpCache(Cache): 5 | """ 6 | This is a disabled Cache Class where no operations occur 7 | in the cache. 8 | Implementing the okta.cache.cache.Cache abstract class. 9 | """ 10 | 11 | def __init__(self): 12 | super() 13 | 14 | def get(self, key): 15 | """ 16 | Nothing is returned. 17 | 18 | Arguments: 19 | key {str} -- Key to look for 20 | 21 | Returns: 22 | None -- No op cache doesn't contain any data to return 23 | """ 24 | return None 25 | 26 | def contains(self, key): 27 | """ 28 | False is returned 29 | 30 | Arguments: 31 | key {str} -- Key to look for 32 | 33 | Returns: 34 | False -- No data to return so key can never be in cache 35 | """ 36 | return False 37 | 38 | def add(self, key, value): 39 | """ 40 | This is a void method 41 | 42 | Arguments: 43 | key {str} -- Key in pair 44 | value {str} -- Val in pair 45 | """ 46 | pass 47 | 48 | def delete(self, key): 49 | """This is a void method. No need to delete anything not contained. 50 | 51 | Arguments: 52 | key {str} -- Key to delete 53 | """ 54 | pass 55 | 56 | def clear(self): 57 | """ 58 | This is a void method. No need to clear when nothing's stored. 59 | """ 60 | pass 61 | -------------------------------------------------------------------------------- /okta/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/okta/config/__init__.py -------------------------------------------------------------------------------- /okta/errors/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/okta/errors/__init__.py -------------------------------------------------------------------------------- /okta/errors/error.py: -------------------------------------------------------------------------------- 1 | class Error: 2 | """ 3 | Base Error Class 4 | """ 5 | 6 | def __init__(self): 7 | self.message = "" 8 | 9 | def __repr__(self): 10 | return str({ 11 | "message": self.message 12 | }) 13 | -------------------------------------------------------------------------------- /okta/errors/http_error.py: -------------------------------------------------------------------------------- 1 | from okta.errors.error import Error 2 | 3 | 4 | class HTTPError(Error): 5 | def __init__(self, url, response_details, response_body): 6 | self.status = response_details.status 7 | self.url = url 8 | self.response_headers = response_details.headers 9 | self.stack = "" 10 | self.message = f"HTTP {self.status} {response_body}" 11 | -------------------------------------------------------------------------------- /okta/errors/okta_api_error.py: -------------------------------------------------------------------------------- 1 | from okta.errors.error import Error 2 | 3 | 4 | class OktaAPIError(Error): 5 | def __init__(self, url, response_details, response_body): 6 | self.status = response_details.status 7 | self.error_code = response_body["errorCode"] 8 | self.error_summary = response_body.get("errorSummary", "") 9 | self.error_causes = response_body.get("errorCauses", []) 10 | error_causes_string = ". ".join(list(map(lambda x: 11 | x.get("errorSummary", ""), 12 | self.error_causes))) 13 | self.error_link = response_body["errorLink"] 14 | self.error_id = response_body["errorId"] 15 | 16 | self.url = url 17 | self.headers = response_details.headers 18 | self.stack = "" 19 | 20 | self.message = (f"Okta HTTP {self.status} {self.error_code} " 21 | f"{self.error_summary}\n{error_causes_string}") 22 | -------------------------------------------------------------------------------- /okta/exceptions/__init__.py: -------------------------------------------------------------------------------- 1 | from . exceptions import HTTPException, OktaAPIException # noqa 2 | -------------------------------------------------------------------------------- /okta/exceptions/exceptions.py: -------------------------------------------------------------------------------- 1 | class OktaBaseException(Exception): 2 | pass 3 | 4 | 5 | class HTTPException(OktaBaseException): 6 | pass 7 | 8 | 9 | class OktaAPIException(OktaBaseException): 10 | pass 11 | -------------------------------------------------------------------------------- /okta/helpers.py: -------------------------------------------------------------------------------- 1 | """ 2 | Module contains different helper functions. 3 | Module is independent from any okta modules. 4 | """ 5 | 6 | import re 7 | 8 | 9 | def to_snake_case(string): 10 | """ 11 | Converts string to snake case. 12 | 13 | Args: 14 | string (str): input string in any case 15 | 16 | Returns: 17 | str: string converted to snake case 18 | 19 | Example: 20 | >>> to_snake_case('lowerCamelCaseString') 21 | 'lower_camel_case_string' 22 | """ 23 | return re.sub(r'(?>> to_lower_camel_case('snake_case_string') 38 | 'snakeCaseString' 39 | """ 40 | components = string.split('_') 41 | # lower first letter in the first component 42 | if components[0]: 43 | components[0] = components[0][0].lower() + components[0][1:] 44 | # join other components with first capitalized first letter 45 | return components[0] + ''.join(x.title() for x in components[1:]) 46 | -------------------------------------------------------------------------------- /okta/logger.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | 4 | LOG_FORMAT = \ 5 | '%(asctime)s - %(name)s - %(module)s - %(levelname)s - %(message)s' 6 | 7 | 8 | def setup_logging(log_level=logging.INFO): 9 | stream_handler = logging.StreamHandler() 10 | stream_handler.setLevel(log_level) 11 | log_formatter = logging.Formatter(LOG_FORMAT) 12 | stream_handler.setFormatter(log_formatter) 13 | 14 | logger = logging.getLogger('okta-sdk-python') 15 | logger.addHandler(stream_handler) 16 | logger.setLevel(log_level) 17 | 18 | # disable logger by default 19 | logger.disabled = True 20 | -------------------------------------------------------------------------------- /okta/models/access_policy.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.models.policy\ 22 | import Policy 23 | from okta.models.policy_type import PolicyType 24 | 25 | 26 | class AccessPolicy( 27 | Policy 28 | ): 29 | """ 30 | A class for AccessPolicy objects. 31 | """ 32 | 33 | def __init__(self, config=None): 34 | super().__init__(config) 35 | pass 36 | 37 | def request_format(self): 38 | parent_req_format = super().request_format() 39 | current_obj_format = { 40 | } 41 | parent_req_format.update(current_obj_format) 42 | return parent_req_format 43 | -------------------------------------------------------------------------------- /okta/models/access_policy_rule_custom_condition.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class AccessPolicyRuleCustomCondition( 25 | OktaObject 26 | ): 27 | """ 28 | A class for AccessPolicyRuleCustomCondition objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.condition = config["condition"]\ 35 | if "condition" in config else None 36 | else: 37 | self.condition = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "condition": self.condition 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/acs_endpoint.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class AcsEndpoint( 25 | OktaObject 26 | ): 27 | """ 28 | A class for AcsEndpoint objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.index = config["index"]\ 35 | if "index" in config else None 36 | self.url = config["url"]\ 37 | if "url" in config else None 38 | else: 39 | self.index = None 40 | self.url = None 41 | 42 | def request_format(self): 43 | parent_req_format = super().request_format() 44 | current_obj_format = { 45 | "index": self.index, 46 | "url": self.url 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/allowed_for_enum.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class AllowedForEnum( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for AllowedForEnum. 30 | """ 31 | 32 | RECOVERY = "recovery", "RECOVERY" 33 | SSO = "sso", "SSO" 34 | ANY = "any", "ANY" 35 | NONE = "none", "NONE" 36 | -------------------------------------------------------------------------------- /okta/models/app_user_password_credential.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class AppUserPasswordCredential( 25 | OktaObject 26 | ): 27 | """ 28 | A class for AppUserPasswordCredential objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.value = config["value"]\ 35 | if "value" in config else None 36 | else: 37 | self.value = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "value": self.value 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/application_credentials_scheme.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ApplicationCredentialsScheme( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ApplicationCredentialsScheme. 30 | """ 31 | 32 | SHARED_USERNAME_AND_PASSWORD = "SHARED_USERNAME_AND_PASSWORD", "shared_username_and_password" 33 | EXTERNAL_PASSWORD_SYNC = "EXTERNAL_PASSWORD_SYNC", "external_password_sync" 34 | EDIT_USERNAME_AND_PASSWORD = "EDIT_USERNAME_AND_PASSWORD", "edit_username_and_password" 35 | EDIT_PASSWORD_ONLY = "EDIT_PASSWORD_ONLY", "edit_password_only" 36 | ADMIN_SETS_CREDENTIALS = "ADMIN_SETS_CREDENTIALS", "admin_sets_credentials" 37 | -------------------------------------------------------------------------------- /okta/models/application_credentials_signing_use.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ApplicationCredentialsSigningUse( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ApplicationCredentialsSigningUse. 30 | """ 31 | 32 | SIG = "sig", "SIG" 33 | -------------------------------------------------------------------------------- /okta/models/application_licensing.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ApplicationLicensing( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ApplicationLicensing objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.seat_count = config["seatCount"]\ 35 | if "seatCount" in config else None 36 | else: 37 | self.seat_count = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "seatCount": self.seat_count 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/authentication_provider_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class AuthenticationProviderType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for AuthenticationProviderType. 30 | """ 31 | 32 | ACTIVE_DIRECTORY = "ACTIVE_DIRECTORY", "active_directory" 33 | FEDERATION = "FEDERATION", "federation" 34 | LDAP = "LDAP", "ldap" 35 | OKTA = "OKTA", "okta" 36 | SOCIAL = "SOCIAL", "social" 37 | IMPORT = "IMPORT", "import" 38 | -------------------------------------------------------------------------------- /okta/models/authenticator_provider_configuration_user_name_plate.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class AuthenticatorProviderConfigurationUserNamePlate( 25 | OktaObject 26 | ): 27 | """ 28 | A class for AuthenticatorProviderConfigurationUserNamePlate objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.template = config["template"]\ 35 | if "template" in config else None 36 | else: 37 | self.template = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "template": self.template 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/authenticator_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class AuthenticatorStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for AuthenticatorStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | INACTIVE = "INACTIVE", "inactive" 34 | -------------------------------------------------------------------------------- /okta/models/authenticator_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class AuthenticatorType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for AuthenticatorType. 30 | """ 31 | 32 | APP = "app", "APP" 33 | PASSWORD = "password", "PASSWORD" 34 | SECURITY_QUESTION = "security_question", "SECURITY_QUESTION" 35 | PHONE = "phone", "PHONE" 36 | EMAIL = "email", "EMAIL" 37 | SECURITY_KEY = "security_key", "SECURITY_KEY" 38 | FEDERATED = "federated", "FEDERATED" 39 | -------------------------------------------------------------------------------- /okta/models/authorization_server_credentials_rotation_mode.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class AuthorizationServerCredentialsRotationMode( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for AuthorizationServerCredentialsRotationMode. 30 | """ 31 | 32 | AUTO = "AUTO", "auto" 33 | MANUAL = "MANUAL", "manual" 34 | -------------------------------------------------------------------------------- /okta/models/authorization_server_credentials_use.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class AuthorizationServerCredentialsUse( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for AuthorizationServerCredentialsUse. 30 | """ 31 | 32 | SIG = "sig", "SIG" 33 | -------------------------------------------------------------------------------- /okta/models/catalog_application_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class CatalogApplicationStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for CatalogApplicationStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | INACTIVE = "INACTIVE", "inactive" 34 | -------------------------------------------------------------------------------- /okta/models/change_enum.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ChangeEnum( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ChangeEnum. 30 | """ 31 | 32 | KEEP_EXISTING = "KEEP_EXISTING", "keep_existing" 33 | CHANGE = "CHANGE", "change" 34 | -------------------------------------------------------------------------------- /okta/models/client_policy_condition.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | from okta.okta_collection import OktaCollection 23 | 24 | 25 | class ClientPolicyCondition( 26 | OktaObject 27 | ): 28 | """ 29 | A class for ClientPolicyCondition objects. 30 | """ 31 | 32 | def __init__(self, config=None): 33 | super().__init__(config) 34 | if config: 35 | self.include = OktaCollection.form_list( 36 | config["include"] if "include"\ 37 | in config else [], 38 | str 39 | ) 40 | else: 41 | self.include = [] 42 | 43 | def request_format(self): 44 | parent_req_format = super().request_format() 45 | current_obj_format = { 46 | "include": self.include 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/client_secret_metadata.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ClientSecretMetadata( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ClientSecretMetadata objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.client_secret = config["clientSecret"]\ 35 | if "clientSecret" in config else None 36 | else: 37 | self.client_secret = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "client_secret": self.client_secret 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/context_policy_rule_condition.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ContextPolicyRuleCondition( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ContextPolicyRuleCondition objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.expression = config["expression"]\ 35 | if "expression" in config else None 36 | else: 37 | self.expression = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "expression": self.expression 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/create_session_request.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class CreateSessionRequest( 25 | OktaObject 26 | ): 27 | """ 28 | A class for CreateSessionRequest objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.session_token = config["sessionToken"]\ 35 | if "sessionToken" in config else None 36 | else: 37 | self.session_token = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "sessionToken": self.session_token 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/custom_hotp_user_factor_profile.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class CustomHotpUserFactorProfile( 25 | OktaObject 26 | ): 27 | """ 28 | A class for CustomHotpUserFactorProfile objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.shared_secret = config["sharedSecret"]\ 35 | if "sharedSecret" in config else None 36 | else: 37 | self.shared_secret = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "sharedSecret": self.shared_secret 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/dns_record_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class DnsRecordType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for DnsRecordType. 30 | """ 31 | 32 | TXT = "TXT", "txt" 33 | CNAME = "CNAME", "cname" 34 | -------------------------------------------------------------------------------- /okta/models/domain_certificate_source_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class DomainCertificateSourceType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for DomainCertificateSourceType. 30 | """ 31 | 32 | MANUAL = "MANUAL", "manual" 33 | OKTA_MANAGED = "OKTA_MANAGED", "okta_managed" 34 | -------------------------------------------------------------------------------- /okta/models/domain_certificate_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class DomainCertificateType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for DomainCertificateType. 30 | """ 31 | 32 | PEM = "PEM", "pem" 33 | -------------------------------------------------------------------------------- /okta/models/domain_validation_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class DomainValidationStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for DomainValidationStatus. 30 | """ 31 | 32 | NOT_STARTED = "NOT_STARTED", "not_started" 33 | IN_PROGRESS = "IN_PROGRESS", "in_progress" 34 | VERIFIED = "VERIFIED", "verified" 35 | FAILED_TO_VERIFY = "FAILED_TO_VERIFY", "failed_to_verify" 36 | DOMAIN_TAKEN = "DOMAIN_TAKEN", "domain_taken" 37 | COMPLETED = "COMPLETED", "completed" 38 | -------------------------------------------------------------------------------- /okta/models/duration.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class Duration( 25 | OktaObject 26 | ): 27 | """ 28 | A class for Duration objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.number = config["number"]\ 35 | if "number" in config else None 36 | self.unit = config["unit"]\ 37 | if "unit" in config else None 38 | else: 39 | self.number = None 40 | self.unit = None 41 | 42 | def request_format(self): 43 | parent_req_format = super().request_format() 44 | current_obj_format = { 45 | "number": self.number, 46 | "unit": self.unit 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/email_template_test_request.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class EmailTemplateTestRequest( 25 | OktaObject 26 | ): 27 | """ 28 | A class for EmailTemplateTestRequest objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.customization_id = config["customizationId"]\ 35 | if "customizationId" in config else None 36 | else: 37 | self.customization_id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "customizationId": self.customization_id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/email_template_touch_point_variant.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class EmailTemplateTouchPointVariant( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for EmailTemplateTouchPointVariant. 30 | """ 31 | 32 | OKTA_DEFAULT = "OKTA_DEFAULT", "okta_default" 33 | FULL_THEME = "FULL_THEME", "full_theme" 34 | -------------------------------------------------------------------------------- /okta/models/email_user_factor_profile.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class EmailUserFactorProfile( 25 | OktaObject 26 | ): 27 | """ 28 | A class for EmailUserFactorProfile objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.email = config["email"]\ 35 | if "email" in config else None 36 | else: 37 | self.email = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "email": self.email 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/enabled_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class EnabledStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for EnabledStatus. 30 | """ 31 | 32 | ENABLED = "ENABLED", "enabled" 33 | DISABLED = "DISABLED", "disabled" 34 | -------------------------------------------------------------------------------- /okta/models/end_user_dashboard_touch_point_variant.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class EndUserDashboardTouchPointVariant( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for EndUserDashboardTouchPointVariant. 30 | """ 31 | 32 | OKTA_DEFAULT = "OKTA_DEFAULT", "okta_default" 33 | WHITE_LOGO_BACKGROUND = "WHITE_LOGO_BACKGROUND", "white_logo_background" 34 | FULL_THEME = "FULL_THEME", "full_theme" 35 | LOGO_ON_FULL_WHITE_BACKGROUND = "LOGO_ON_FULL_WHITE_BACKGROUND", "logo_on_full_white_background" 36 | -------------------------------------------------------------------------------- /okta/models/error_page_touch_point_variant.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ErrorPageTouchPointVariant( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ErrorPageTouchPointVariant. 30 | """ 31 | 32 | OKTA_DEFAULT = "OKTA_DEFAULT", "okta_default" 33 | BACKGROUND_SECONDARY_COLOR = "BACKGROUND_SECONDARY_COLOR", "background_secondary_color" 34 | BACKGROUND_IMAGE = "BACKGROUND_IMAGE", "background_image" 35 | -------------------------------------------------------------------------------- /okta/models/event_hook_channel_config_auth_scheme_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class EventHookChannelConfigAuthSchemeType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for EventHookChannelConfigAuthSchemeType. 30 | """ 31 | 32 | HEADER = "HEADER", "header" 33 | -------------------------------------------------------------------------------- /okta/models/factor_provider.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class FactorProvider( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for FactorProvider. 30 | """ 31 | 32 | OKTA = "OKTA", "okta" 33 | RSA = "RSA", "rsa" 34 | FIDO = "FIDO", "fido" 35 | GOOGLE = "GOOGLE", "google" 36 | SYMANTEC = "SYMANTEC", "symantec" 37 | DUO = "DUO", "duo" 38 | YUBICO = "YUBICO", "yubico" 39 | CUSTOM = "CUSTOM", "custom" 40 | APPLE = "APPLE", "apple" 41 | -------------------------------------------------------------------------------- /okta/models/factor_result_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class FactorResultType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for FactorResultType. 30 | """ 31 | 32 | SUCCESS = "SUCCESS", "success" 33 | CHALLENGE = "CHALLENGE", "challenge" 34 | WAITING = "WAITING", "waiting" 35 | FAILED = "FAILED", "failed" 36 | REJECTED = "REJECTED", "rejected" 37 | TIMEOUT = "TIMEOUT", "timeout" 38 | TIME_WINDOW_EXCEEDED = "TIME_WINDOW_EXCEEDED", "time_window_exceeded" 39 | PASSCODE_REPLAYED = "PASSCODE_REPLAYED", "passcode_replayed" 40 | ERROR = "ERROR", "error" 41 | CANCELLED = "CANCELLED", "cancelled" 42 | -------------------------------------------------------------------------------- /okta/models/factor_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class FactorStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for FactorStatus. 30 | """ 31 | 32 | PENDING_ACTIVATION = "PENDING_ACTIVATION", "pending_activation" 33 | ACTIVE = "ACTIVE", "active" 34 | INACTIVE = "INACTIVE", "inactive" 35 | NOT_SETUP = "NOT_SETUP", "not_setup" 36 | ENROLLED = "ENROLLED", "enrolled" 37 | DISABLED = "DISABLED", "disabled" 38 | EXPIRED = "EXPIRED", "expired" 39 | -------------------------------------------------------------------------------- /okta/models/factor_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class FactorType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for FactorType. 30 | """ 31 | 32 | CALL = "call", "CALL" 33 | EMAIL = "email", "EMAIL" 34 | HOTP = "hotp", "HOTP" 35 | PUSH = "push", "PUSH" 36 | QUESTION = "question", "QUESTION" 37 | SIGNED_NONCE = "signed_nonce", "SIGNED_NONCE" 38 | SMS = "sms", "SMS" 39 | TOKEN_HARDWARE = "token:hardware", "TOKEN:HARDWARE" 40 | TOKEN_HOTP = "token:hotp", "TOKEN:HOTP" 41 | TOKEN_SOFTWARE_TOTP = "token:software:totp", "TOKEN:SOFTWARE:TOTP" 42 | TOKEN = "token", "TOKEN" 43 | U_2_F = "u2f", "U2F" 44 | WEB = "web", "WEB" 45 | WEBAUTHN = "webauthn", "WEBAUTHN" 46 | -------------------------------------------------------------------------------- /okta/models/feature_stage_state.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class FeatureStageState( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for FeatureStageState. 30 | """ 31 | 32 | OPEN = "OPEN", "open" 33 | CLOSED = "CLOSED", "closed" 34 | -------------------------------------------------------------------------------- /okta/models/feature_stage_value.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class FeatureStageValue( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for FeatureStageValue. 30 | """ 31 | 32 | EA = "EA", "ea" 33 | BETA = "BETA", "beta" 34 | -------------------------------------------------------------------------------- /okta/models/feature_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class FeatureType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for FeatureType. 30 | """ 31 | 32 | SELF_SERVICE = "self-service", "SELF-SERVICE" 33 | -------------------------------------------------------------------------------- /okta/models/fips_enum.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class FipsEnum( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for FipsEnum. 30 | """ 31 | 32 | REQUIRED = "REQUIRED", "required" 33 | OPTIONAL = "OPTIONAL", "optional" 34 | -------------------------------------------------------------------------------- /okta/models/forgot_password_response.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ForgotPasswordResponse( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ForgotPasswordResponse objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.reset_password_url = config["resetPasswordUrl"]\ 35 | if "resetPasswordUrl" in config else None 36 | else: 37 | self.reset_password_url = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "resetPasswordUrl": self.reset_password_url 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/group_rule_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class GroupRuleStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for GroupRuleStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | INACTIVE = "INACTIVE", "inactive" 34 | INVALID = "INVALID", "invalid" 35 | -------------------------------------------------------------------------------- /okta/models/group_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class GroupType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for GroupType. 30 | """ 31 | 32 | OKTA_GROUP = "OKTA_GROUP", "okta_group" 33 | APP_GROUP = "APP_GROUP", "app_group" 34 | BUILT_IN = "BUILT_IN", "built_in" 35 | -------------------------------------------------------------------------------- /okta/models/hardware_user_factor_profile.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class HardwareUserFactorProfile( 25 | OktaObject 26 | ): 27 | """ 28 | A class for HardwareUserFactorProfile objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.credential_id = config["credentialId"]\ 35 | if "credentialId" in config else None 36 | else: 37 | self.credential_id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "credentialId": self.credential_id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/iframe_embed_scope_allowed_apps.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class IframeEmbedScopeAllowedApps( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for IframeEmbedScopeAllowedApps. 30 | """ 31 | 32 | OKTA_ENDUSER = "OKTA_ENDUSER", "okta_enduser" 33 | -------------------------------------------------------------------------------- /okta/models/image_upload_response.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ImageUploadResponse( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ImageUploadResponse objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.url = config["url"]\ 35 | if "url" in config else None 36 | else: 37 | self.url = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "url": self.url 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/inline_hook_payload.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class InlineHookPayload( 25 | OktaObject 26 | ): 27 | """ 28 | A class for InlineHookPayload objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | pass 34 | 35 | def request_format(self): 36 | parent_req_format = super().request_format() 37 | current_obj_format = { 38 | } 39 | parent_req_format.update(current_obj_format) 40 | return parent_req_format 41 | -------------------------------------------------------------------------------- /okta/models/inline_hook_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class InlineHookStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for InlineHookStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | INACTIVE = "INACTIVE", "inactive" 34 | -------------------------------------------------------------------------------- /okta/models/inline_hook_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class InlineHookType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for InlineHookType. 30 | """ 31 | 32 | COM_OKTA_OAUTH_2_TOKENS_TRANSFORM = "com.okta.oauth2.tokens.transform", "COM.OKTA.OAUTH2.TOKENS.TRANSFORM" 33 | COM_OKTA_IMPORT_TRANSFORM = "com.okta.import.transform", "COM.OKTA.IMPORT.TRANSFORM" 34 | COM_OKTA_SAML_TOKENS_TRANSFORM = "com.okta.saml.tokens.transform", "COM.OKTA.SAML.TOKENS.TRANSFORM" 35 | COM_OKTA_USER_PRE_REGISTRATION = "com.okta.user.pre-registration", "COM.OKTA.USER.PRE-REGISTRATION" 36 | COM_OKTA_USER_CREDENTIAL_PASSWORD_IMPORT = "com.okta.user.credential.password.import", "COM.OKTA.USER.CREDENTIAL.PASSWORD.IMPORT" 37 | -------------------------------------------------------------------------------- /okta/models/jwk_use.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class JwkUse( 25 | OktaObject 26 | ): 27 | """ 28 | A class for JwkUse objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.use = config["use"]\ 35 | if "use" in config else None 36 | else: 37 | self.use = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "use": self.use 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/knowledge_constraint.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.models.access_policy_constraint\ 22 | import AccessPolicyConstraint 23 | 24 | 25 | class KnowledgeConstraint( 26 | AccessPolicyConstraint 27 | ): 28 | """ 29 | A class for KnowledgeConstraint objects. 30 | """ 31 | 32 | def __init__(self, config=None): 33 | super().__init__(config) 34 | pass 35 | 36 | def request_format(self): 37 | parent_req_format = super().request_format() 38 | current_obj_format = { 39 | } 40 | parent_req_format.update(current_obj_format) 41 | return parent_req_format 42 | -------------------------------------------------------------------------------- /okta/models/linked_object_details_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class LinkedObjectDetailsType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for LinkedObjectDetailsType. 30 | """ 31 | 32 | USER = "USER", "user" 33 | -------------------------------------------------------------------------------- /okta/models/log_authentication_provider.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class LogAuthenticationProvider( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for LogAuthenticationProvider. 30 | """ 31 | 32 | OKTA_AUTHENTICATION_PROVIDER = "OKTA_AUTHENTICATION_PROVIDER", "okta_authentication_provider" 33 | ACTIVE_DIRECTORY = "ACTIVE_DIRECTORY", "active_directory" 34 | LDAP = "LDAP", "ldap" 35 | FEDERATION = "FEDERATION", "federation" 36 | SOCIAL = "SOCIAL", "social" 37 | FACTOR_PROVIDER = "FACTOR_PROVIDER", "factor_provider" 38 | -------------------------------------------------------------------------------- /okta/models/log_credential_provider.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class LogCredentialProvider( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for LogCredentialProvider. 30 | """ 31 | 32 | OKTA_AUTHENTICATION_PROVIDER = "OKTA_AUTHENTICATION_PROVIDER", "okta_authentication_provider" 33 | OKTA_CREDENTIAL_PROVIDER = "OKTA_CREDENTIAL_PROVIDER", "okta_credential_provider" 34 | RSA = "RSA", "rsa" 35 | SYMANTEC = "SYMANTEC", "symantec" 36 | GOOGLE = "GOOGLE", "google" 37 | DUO = "DUO", "duo" 38 | YUBIKEY = "YUBIKEY", "yubikey" 39 | APPLE = "APPLE", "apple" 40 | -------------------------------------------------------------------------------- /okta/models/log_credential_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class LogCredentialType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for LogCredentialType. 30 | """ 31 | 32 | OTP = "OTP", "otp" 33 | SMS = "SMS", "sms" 34 | PASSWORD = "PASSWORD", "password" 35 | ASSERTION = "ASSERTION", "assertion" 36 | IWA = "IWA", "iwa" 37 | EMAIL = "EMAIL", "email" 38 | OAUTH_2 = "OAUTH2", "oauth2" 39 | JWT = "JWT", "jwt" 40 | -------------------------------------------------------------------------------- /okta/models/log_debug_context.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class LogDebugContext( 25 | OktaObject 26 | ): 27 | """ 28 | A class for LogDebugContext objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.debug_data = config["debugData"]\ 35 | if "debugData" in config else None 36 | else: 37 | self.debug_data = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "debugData": self.debug_data 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/log_geolocation.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class LogGeolocation( 25 | OktaObject 26 | ): 27 | """ 28 | A class for LogGeolocation objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.lat = config["lat"]\ 35 | if "lat" in config else None 36 | self.lon = config["lon"]\ 37 | if "lon" in config else None 38 | else: 39 | self.lat = None 40 | self.lon = None 41 | 42 | def request_format(self): 43 | parent_req_format = super().request_format() 44 | current_obj_format = { 45 | "lat": self.lat, 46 | "lon": self.lon 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/log_issuer.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class LogIssuer( 25 | OktaObject 26 | ): 27 | """ 28 | A class for LogIssuer objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.id = config["id"]\ 35 | if "id" in config else None 36 | self.type = config["type"]\ 37 | if "type" in config else None 38 | else: 39 | self.id = None 40 | self.type = None 41 | 42 | def request_format(self): 43 | parent_req_format = super().request_format() 44 | current_obj_format = { 45 | "id": self.id, 46 | "type": self.type 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/log_outcome.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class LogOutcome( 25 | OktaObject 26 | ): 27 | """ 28 | A class for LogOutcome objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.reason = config["reason"]\ 35 | if "reason" in config else None 36 | self.result = config["result"]\ 37 | if "result" in config else None 38 | else: 39 | self.reason = None 40 | self.result = None 41 | 42 | def request_format(self): 43 | parent_req_format = super().request_format() 44 | current_obj_format = { 45 | "reason": self.reason, 46 | "result": self.result 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/log_severity.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class LogSeverity( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for LogSeverity. 30 | """ 31 | 32 | DEBUG = "DEBUG", "debug" 33 | INFO = "INFO", "info" 34 | WARN = "WARN", "warn" 35 | ERROR = "ERROR", "error" 36 | -------------------------------------------------------------------------------- /okta/models/multifactor_enrollment_policy.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.models.policy\ 22 | import Policy 23 | from okta.models.policy_type import PolicyType 24 | 25 | 26 | class MultifactorEnrollmentPolicy( 27 | Policy 28 | ): 29 | """ 30 | A class for MultifactorEnrollmentPolicy objects. 31 | """ 32 | 33 | def __init__(self, config=None): 34 | super().__init__(config) 35 | pass 36 | 37 | def request_format(self): 38 | parent_req_format = super().request_format() 39 | current_obj_format = { 40 | } 41 | parent_req_format.update(current_obj_format) 42 | return parent_req_format 43 | -------------------------------------------------------------------------------- /okta/models/multifactor_enrollment_policy_authenticator_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class MultifactorEnrollmentPolicyAuthenticatorStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for MultifactorEnrollmentPolicyAuthenticatorStatus. 30 | """ 31 | 32 | NOT_ALLOWED = "NOT_ALLOWED", "not_allowed" 33 | OPTIONAL = "OPTIONAL", "optional" 34 | REQUIRED = "REQUIRED", "required" 35 | -------------------------------------------------------------------------------- /okta/models/multifactor_enrollment_policy_settings_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class MultifactorEnrollmentPolicySettingsType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for MultifactorEnrollmentPolicySettingsType. 30 | """ 31 | 32 | AUTHENTICATORS = "AUTHENTICATORS", "authenticators" 33 | -------------------------------------------------------------------------------- /okta/models/network_zone_address_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class NetworkZoneAddressType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for NetworkZoneAddressType. 30 | """ 31 | 32 | CIDR = "CIDR", "cidr" 33 | RANGE = "RANGE", "range" 34 | -------------------------------------------------------------------------------- /okta/models/network_zone_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class NetworkZoneStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for NetworkZoneStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | INACTIVE = "INACTIVE", "inactive" 34 | -------------------------------------------------------------------------------- /okta/models/network_zone_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class NetworkZoneType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for NetworkZoneType. 30 | """ 31 | 32 | IP = "IP", "ip" 33 | DYNAMIC = "DYNAMIC", "dynamic" 34 | -------------------------------------------------------------------------------- /okta/models/network_zone_usage.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class NetworkZoneUsage( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for NetworkZoneUsage. 30 | """ 31 | 32 | POLICY = "POLICY", "policy" 33 | BLOCKLIST = "BLOCKLIST", "blocklist" 34 | -------------------------------------------------------------------------------- /okta/models/o_auth_2_actor.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class OAuth2Actor( 25 | OktaObject 26 | ): 27 | """ 28 | A class for OAuth2Actor objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.id = config["id"]\ 35 | if "id" in config else None 36 | self.type = config["type"]\ 37 | if "type" in config else None 38 | else: 39 | self.id = None 40 | self.type = None 41 | 42 | def request_format(self): 43 | parent_req_format = super().request_format() 44 | current_obj_format = { 45 | "id": self.id, 46 | "type": self.type 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/o_auth_2_claim_conditions.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | from okta.okta_collection import OktaCollection 23 | 24 | 25 | class OAuth2ClaimConditions( 26 | OktaObject 27 | ): 28 | """ 29 | A class for OAuth2ClaimConditions objects. 30 | """ 31 | 32 | def __init__(self, config=None): 33 | super().__init__(config) 34 | if config: 35 | self.scopes = OktaCollection.form_list( 36 | config["scopes"] if "scopes"\ 37 | in config else [], 38 | str 39 | ) 40 | else: 41 | self.scopes = [] 42 | 43 | def request_format(self): 44 | parent_req_format = super().request_format() 45 | current_obj_format = { 46 | "scopes": self.scopes 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/o_auth_2_scope_consent_grant_source.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OAuth2ScopeConsentGrantSource( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OAuth2ScopeConsentGrantSource. 30 | """ 31 | 32 | END_USER = "END_USER", "end_user" 33 | ADMIN = "ADMIN", "admin" 34 | -------------------------------------------------------------------------------- /okta/models/o_auth_2_scope_consent_grant_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OAuth2ScopeConsentGrantStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OAuth2ScopeConsentGrantStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | REVOKED = "REVOKED", "revoked" 34 | -------------------------------------------------------------------------------- /okta/models/o_auth_authorization_policy.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.models.policy\ 22 | import Policy 23 | from okta.models.policy_type import PolicyType 24 | 25 | 26 | class OAuthAuthorizationPolicy( 27 | Policy 28 | ): 29 | """ 30 | A class for OAuthAuthorizationPolicy objects. 31 | """ 32 | 33 | def __init__(self, config=None): 34 | super().__init__(config) 35 | pass 36 | 37 | def request_format(self): 38 | parent_req_format = super().request_format() 39 | current_obj_format = { 40 | } 41 | parent_req_format.update(current_obj_format) 42 | return parent_req_format 43 | -------------------------------------------------------------------------------- /okta/models/o_auth_endpoint_authentication_method.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OAuthEndpointAuthenticationMethod( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OAuthEndpointAuthenticationMethod. 30 | """ 31 | 32 | NONE = "none", "NONE" 33 | CLIENT_SECRET_POST = "client_secret_post", "CLIENT_SECRET_POST" 34 | CLIENT_SECRET_BASIC = "client_secret_basic", "CLIENT_SECRET_BASIC" 35 | CLIENT_SECRET_JWT = "client_secret_jwt", "CLIENT_SECRET_JWT" 36 | PRIVATE_KEY_JWT = "private_key_jwt", "PRIVATE_KEY_JWT" 37 | -------------------------------------------------------------------------------- /okta/models/o_auth_response_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OAuthResponseType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OAuthResponseType. 30 | """ 31 | 32 | CODE = "code", "CODE" 33 | TOKEN = "token", "TOKEN" 34 | ID_TOKEN = "id_token", "ID_TOKEN" 35 | -------------------------------------------------------------------------------- /okta/models/open_id_connect_application_consent_method.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OpenIdConnectApplicationConsentMethod( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OpenIdConnectApplicationConsentMethod. 30 | """ 31 | 32 | REQUIRED = "REQUIRED", "required" 33 | TRUSTED = "TRUSTED", "trusted" 34 | -------------------------------------------------------------------------------- /okta/models/open_id_connect_application_issuer_mode.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OpenIdConnectApplicationIssuerMode( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OpenIdConnectApplicationIssuerMode. 30 | """ 31 | 32 | CUSTOM_URL = "CUSTOM_URL", "custom_url" 33 | ORG_URL = "ORG_URL", "org_url" 34 | DYNAMIC = "DYNAMIC", "dynamic" 35 | -------------------------------------------------------------------------------- /okta/models/open_id_connect_application_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OpenIdConnectApplicationType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OpenIdConnectApplicationType. 30 | """ 31 | 32 | WEB = "web", "WEB" 33 | NATIVE = "native", "NATIVE" 34 | BROWSER = "browser", "BROWSER" 35 | SERVICE = "service", "SERVICE" 36 | -------------------------------------------------------------------------------- /okta/models/open_id_connect_refresh_token_rotation_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OpenIdConnectRefreshTokenRotationType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OpenIdConnectRefreshTokenRotationType. 30 | """ 31 | 32 | ROTATE = "rotate", "ROTATE" 33 | STATIC = "static", "STATIC" 34 | -------------------------------------------------------------------------------- /okta/models/org_contact_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OrgContactType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OrgContactType. 30 | """ 31 | 32 | BILLING = "BILLING", "billing" 33 | TECHNICAL = "TECHNICAL", "technical" 34 | -------------------------------------------------------------------------------- /okta/models/org_okta_support_setting.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class OrgOktaSupportSetting( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for OrgOktaSupportSetting. 30 | """ 31 | 32 | DISABLED = "DISABLED", "disabled" 33 | ENABLED = "ENABLED", "enabled" 34 | -------------------------------------------------------------------------------- /okta/models/password_credential_hash_algorithm.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class PasswordCredentialHashAlgorithm( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for PasswordCredentialHashAlgorithm. 30 | """ 31 | 32 | BCRYPT = "BCRYPT", "bcrypt" 33 | SHA_512 = "SHA-512", "sha-512" 34 | SHA_256 = "SHA-256", "sha-256" 35 | SHA_1 = "SHA-1", "sha-1" 36 | MD_5 = "MD5", "md5" 37 | -------------------------------------------------------------------------------- /okta/models/password_credential_hook.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PasswordCredentialHook( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PasswordCredentialHook objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.type = config["type"]\ 35 | if "type" in config else None 36 | else: 37 | self.type = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "type": self.type 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/password_dictionary_common.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PasswordDictionaryCommon( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PasswordDictionaryCommon objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.exclude = config["exclude"]\ 35 | if "exclude" in config else False 36 | else: 37 | self.exclude = False 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "exclude": self.exclude 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/password_policy_delegation_settings_options.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PasswordPolicyDelegationSettingsOptions( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PasswordPolicyDelegationSettingsOptions objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.skip_unlock = config["skipUnlock"]\ 35 | if "skipUnlock" in config else None 36 | else: 37 | self.skip_unlock = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "skipUnlock": self.skip_unlock 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/password_policy_recovery_factor_settings.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PasswordPolicyRecoveryFactorSettings( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PasswordPolicyRecoveryFactorSettings objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.status = config["status"]\ 35 | if "status" in config else "INACTIVE" 36 | else: 37 | self.status = "INACTIVE" 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "status": self.status 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/password_policy_recovery_question_complexity.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PasswordPolicyRecoveryQuestionComplexity( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PasswordPolicyRecoveryQuestionComplexity objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.min_length = config["minLength"]\ 35 | if "minLength" in config else None 36 | else: 37 | self.min_length = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "minLength": self.min_length 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/password_policy_rule_action.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PasswordPolicyRuleAction( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PasswordPolicyRuleAction objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.access = config["access"]\ 35 | if "access" in config else None 36 | else: 37 | self.access = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "access": self.access 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/policy_rule_actions_enroll_self.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class PolicyRuleActionsEnrollSelf( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for PolicyRuleActionsEnrollSelf. 30 | """ 31 | 32 | CHALLENGE = "CHALLENGE", "challenge" 33 | LOGIN = "LOGIN", "login" 34 | NEVER = "NEVER", "never" 35 | -------------------------------------------------------------------------------- /okta/models/policy_rule_auth_context_condition.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PolicyRuleAuthContextCondition( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PolicyRuleAuthContextCondition objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.auth_type = config["authType"]\ 35 | if "authType" in config else None 36 | else: 37 | self.auth_type = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "authType": self.auth_type 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/policy_subject_match_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class PolicySubjectMatchType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for PolicySubjectMatchType. 30 | """ 31 | 32 | USERNAME = "USERNAME", "username" 33 | EMAIL = "EMAIL", "email" 34 | USERNAME_OR_EMAIL = "USERNAME_OR_EMAIL", "username_or_email" 35 | CUSTOM_ATTRIBUTE = "CUSTOM_ATTRIBUTE", "custom_attribute" 36 | -------------------------------------------------------------------------------- /okta/models/policy_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class PolicyType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for PolicyType. 30 | """ 31 | 32 | OAUTH_AUTHORIZATION_POLICY = "OAUTH_AUTHORIZATION_POLICY", "oauth_authorization_policy" 33 | OKTA_SIGN_ON = "OKTA_SIGN_ON", "okta_sign_on" 34 | PASSWORD = "PASSWORD", "password" 35 | IDP_DISCOVERY = "IDP_DISCOVERY", "idp_discovery" 36 | PROFILE_ENROLLMENT = "PROFILE_ENROLLMENT", "profile_enrollment" 37 | ACCESS_POLICY = "ACCESS_POLICY", "access_policy" 38 | MFA_ENROLL = "MFA_ENROLL", "mfa_enroll" 39 | -------------------------------------------------------------------------------- /okta/models/policy_user_name_template.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PolicyUserNameTemplate( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PolicyUserNameTemplate objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.template = config["template"]\ 35 | if "template" in config else None 36 | else: 37 | self.template = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "template": self.template 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/pre_registration_inline_hook.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class PreRegistrationInlineHook( 25 | OktaObject 26 | ): 27 | """ 28 | A class for PreRegistrationInlineHook objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.inline_hook_id = config["inlineHookId"]\ 35 | if "inlineHookId" in config else None 36 | else: 37 | self.inline_hook_id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "inlineHookId": self.inline_hook_id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/profile_enrollment_policy.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.models.policy\ 22 | import Policy 23 | from okta.models.policy_type import PolicyType 24 | 25 | 26 | class ProfileEnrollmentPolicy( 27 | Policy 28 | ): 29 | """ 30 | A class for ProfileEnrollmentPolicy objects. 31 | """ 32 | 33 | def __init__(self, config=None): 34 | super().__init__(config) 35 | pass 36 | 37 | def request_format(self): 38 | parent_req_format = super().request_format() 39 | current_obj_format = { 40 | } 41 | parent_req_format.update(current_obj_format) 42 | return parent_req_format 43 | -------------------------------------------------------------------------------- /okta/models/profile_mapping_property_push_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ProfileMappingPropertyPushStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ProfileMappingPropertyPushStatus. 30 | """ 31 | 32 | PUSH = "PUSH", "push" 33 | DONT_PUSH = "DONT_PUSH", "dont_push" 34 | -------------------------------------------------------------------------------- /okta/models/protocol_relay_state_format.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ProtocolRelayStateFormat( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ProtocolRelayStateFormat. 30 | """ 31 | 32 | OPAQUE = "OPAQUE", "opaque" 33 | FROM_URL = "FROM_URL", "from_url" 34 | -------------------------------------------------------------------------------- /okta/models/protocol_settings.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ProtocolSettings( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ProtocolSettings objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.name_format = config["nameFormat"]\ 35 | if "nameFormat" in config else None 36 | else: 37 | self.name_format = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "nameFormat": self.name_format 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/provisioning_connection_auth_scheme.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ProvisioningConnectionAuthScheme( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ProvisioningConnectionAuthScheme. 30 | """ 31 | 32 | TOKEN = "TOKEN", "token" 33 | UNKNOWN = "UNKNOWN", "unknown" 34 | -------------------------------------------------------------------------------- /okta/models/provisioning_connection_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ProvisioningConnectionStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ProvisioningConnectionStatus. 30 | """ 31 | 32 | DISABLED = "DISABLED", "disabled" 33 | ENABLED = "ENABLED", "enabled" 34 | UNKNOWN = "UNKNOWN", "unknown" 35 | -------------------------------------------------------------------------------- /okta/models/provisioning_deprovisioned_condition.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ProvisioningDeprovisionedCondition( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ProvisioningDeprovisionedCondition objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.action = config["action"]\ 35 | if "action" in config else None 36 | else: 37 | self.action = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "action": self.action 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/provisioning_suspended_condition.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ProvisioningSuspendedCondition( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ProvisioningSuspendedCondition objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.action = config["action"]\ 35 | if "action" in config else None 36 | else: 37 | self.action = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "action": self.action 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/required_enum.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class RequiredEnum( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for RequiredEnum. 30 | """ 31 | 32 | ALWAYS = "ALWAYS", "always" 33 | HIGH_RISK_ONLY = "HIGH_RISK_ONLY", "high_risk_only" 34 | NEVER = "NEVER", "never" 35 | -------------------------------------------------------------------------------- /okta/models/reset_password_token.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ResetPasswordToken( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ResetPasswordToken objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.reset_password_url = config["resetPasswordUrl"]\ 35 | if "resetPasswordUrl" in config else None 36 | else: 37 | self.reset_password_url = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "resetPasswordUrl": self.reset_password_url 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/response_links.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ResponseLinks( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ResponseLinks objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.links = config["links"]\ 35 | if "links" in config else None 36 | if "_links" in config: 37 | self.links = config["_links"] 38 | else: 39 | self.links = None 40 | 41 | def request_format(self): 42 | parent_req_format = super().request_format() 43 | current_obj_format = { 44 | "_links": self.links 45 | } 46 | parent_req_format.update(current_obj_format) 47 | return parent_req_format 48 | -------------------------------------------------------------------------------- /okta/models/risk_score_policy_rule_condition.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class RiskScorePolicyRuleCondition( 25 | OktaObject 26 | ): 27 | """ 28 | A class for RiskScorePolicyRuleCondition objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.level = config["level"]\ 35 | if "level" in config else None 36 | else: 37 | self.level = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "level": self.level 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/role_assignment_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class RoleAssignmentType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for RoleAssignmentType. 30 | """ 31 | 32 | GROUP = "GROUP", "group" 33 | USER = "USER", "user" 34 | -------------------------------------------------------------------------------- /okta/models/role_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class RoleStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for RoleStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | INACTIVE = "INACTIVE", "inactive" 34 | -------------------------------------------------------------------------------- /okta/models/role_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class RoleType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for RoleType. 30 | """ 31 | 32 | SUPER_ADMIN = "SUPER_ADMIN", "super_admin" 33 | ORG_ADMIN = "ORG_ADMIN", "org_admin" 34 | APP_ADMIN = "APP_ADMIN", "app_admin" 35 | USER_ADMIN = "USER_ADMIN", "user_admin" 36 | HELP_DESK_ADMIN = "HELP_DESK_ADMIN", "help_desk_admin" 37 | READ_ONLY_ADMIN = "READ_ONLY_ADMIN", "read_only_admin" 38 | MOBILE_ADMIN = "MOBILE_ADMIN", "mobile_admin" 39 | API_ACCESS_MANAGEMENT_ADMIN = "API_ACCESS_MANAGEMENT_ADMIN", "api_access_management_admin" 40 | REPORT_ADMIN = "REPORT_ADMIN", "report_admin" 41 | GROUP_MEMBERSHIP_ADMIN = "GROUP_MEMBERSHIP_ADMIN", "group_membership_admin" 42 | CUSTOM = "CUSTOM", "custom" 43 | -------------------------------------------------------------------------------- /okta/models/scheduled_user_lifecycle_action.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class ScheduledUserLifecycleAction( 25 | OktaObject 26 | ): 27 | """ 28 | A class for ScheduledUserLifecycleAction objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.status = config["status"]\ 35 | if "status" in config else None 36 | else: 37 | self.status = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "status": self.status 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/scope_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class ScopeType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for ScopeType. 30 | """ 31 | 32 | CORS = "CORS", "cors" 33 | REDIRECT = "REDIRECT", "redirect" 34 | IFRAME_EMBED = "IFRAME_EMBED", "iframe_embed" 35 | -------------------------------------------------------------------------------- /okta/models/seed_enum.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class SeedEnum( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for SeedEnum. 30 | """ 31 | 32 | OKTA = "OKTA", "okta" 33 | RANDOM = "RANDOM", "random" 34 | -------------------------------------------------------------------------------- /okta/models/session_authentication_method.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class SessionAuthenticationMethod( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for SessionAuthenticationMethod. 30 | """ 31 | 32 | PWD = "pwd", "PWD" 33 | SWK = "swk", "SWK" 34 | HWK = "hwk", "HWK" 35 | OTP = "otp", "OTP" 36 | SMS = "sms", "SMS" 37 | TEL = "tel", "TEL" 38 | GEO = "geo", "GEO" 39 | FPT = "fpt", "FPT" 40 | KBA = "kba", "KBA" 41 | MFA = "mfa", "MFA" 42 | MCA = "mca", "MCA" 43 | SC = "sc", "SC" 44 | -------------------------------------------------------------------------------- /okta/models/session_identity_provider_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class SessionIdentityProviderType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for SessionIdentityProviderType. 30 | """ 31 | 32 | ACTIVE_DIRECTORY = "ACTIVE_DIRECTORY", "active_directory" 33 | LDAP = "LDAP", "ldap" 34 | OKTA = "OKTA", "okta" 35 | FEDERATION = "FEDERATION", "federation" 36 | SOCIAL = "SOCIAL", "social" 37 | -------------------------------------------------------------------------------- /okta/models/session_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class SessionStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for SessionStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | MFA_ENROLL = "MFA_ENROLL", "mfa_enroll" 34 | MFA_REQUIRED = "MFA_REQUIRED", "mfa_required" 35 | -------------------------------------------------------------------------------- /okta/models/sign_in_page_touch_point_variant.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class SignInPageTouchPointVariant( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for SignInPageTouchPointVariant. 30 | """ 31 | 32 | OKTA_DEFAULT = "OKTA_DEFAULT", "okta_default" 33 | BACKGROUND_SECONDARY_COLOR = "BACKGROUND_SECONDARY_COLOR", "background_secondary_color" 34 | BACKGROUND_IMAGE = "BACKGROUND_IMAGE", "background_image" 35 | -------------------------------------------------------------------------------- /okta/models/sign_on_inline_hook.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class SignOnInlineHook( 25 | OktaObject 26 | ): 27 | """ 28 | A class for SignOnInlineHook objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.id = config["id"]\ 35 | if "id" in config else None 36 | else: 37 | self.id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "id": self.id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/sms_template_translations.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class SmsTemplateTranslations( 25 | OktaObject 26 | ): 27 | """ 28 | A class for SmsTemplateTranslations objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | for lang in config.keys(): 35 | setattr(self, lang, config[lang]) 36 | 37 | def request_format(self): 38 | parent_req_format = super().request_format() 39 | current_obj_format = vars(self) 40 | parent_req_format.update(current_obj_format) 41 | return parent_req_format 42 | -------------------------------------------------------------------------------- /okta/models/sms_template_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class SmsTemplateType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for SmsTemplateType. 30 | """ 31 | 32 | SMS_VERIFY_CODE = "SMS_VERIFY_CODE", "sms_verify_code" 33 | -------------------------------------------------------------------------------- /okta/models/sms_user_factor_profile.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class SmsUserFactorProfile( 25 | OktaObject 26 | ): 27 | """ 28 | A class for SmsUserFactorProfile objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.phone_number = config["phoneNumber"]\ 35 | if "phoneNumber" in config else None 36 | else: 37 | self.phone_number = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "phoneNumber": self.phone_number 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/sp_certificate.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | from okta.okta_collection import OktaCollection 23 | 24 | 25 | class SpCertificate( 26 | OktaObject 27 | ): 28 | """ 29 | A class for SpCertificate objects. 30 | """ 31 | 32 | def __init__(self, config=None): 33 | super().__init__(config) 34 | if config: 35 | self.x_5_c = OktaCollection.form_list( 36 | config["x5C"] if "x5C"\ 37 | in config else [], 38 | str 39 | ) 40 | else: 41 | self.x_5_c = [] 42 | 43 | def request_format(self): 44 | parent_req_format = super().request_format() 45 | current_obj_format = { 46 | "x5c": self.x_5_c 47 | } 48 | parent_req_format.update(current_obj_format) 49 | return parent_req_format 50 | -------------------------------------------------------------------------------- /okta/models/subscription_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class SubscriptionStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for SubscriptionStatus. 30 | """ 31 | 32 | SUBSCRIBED = "subscribed", "SUBSCRIBED" 33 | UNSUBSCRIBED = "unsubscribed", "UNSUBSCRIBED" 34 | -------------------------------------------------------------------------------- /okta/models/temp_password.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class TempPassword( 25 | OktaObject 26 | ): 27 | """ 28 | A class for TempPassword objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.temp_password = config["tempPassword"]\ 35 | if "tempPassword" in config else None 36 | else: 37 | self.temp_password = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "tempPassword": self.temp_password 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/token_authorization_server_policy_rule_action_inline_hook.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class TokenAuthorizationServerPolicyRuleActionInlineHook( 25 | OktaObject 26 | ): 27 | """ 28 | A class for TokenAuthorizationServerPolicyRuleActionInlineHook objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.id = config["id"]\ 35 | if "id" in config else None 36 | else: 37 | self.id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "id": self.id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/token_user_factor_profile.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class TokenUserFactorProfile( 25 | OktaObject 26 | ): 27 | """ 28 | A class for TokenUserFactorProfile objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.credential_id = config["credentialId"]\ 35 | if "credentialId" in config else None 36 | else: 37 | self.credential_id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "credentialId": self.credential_id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/totp_user_factor_profile.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class TotpUserFactorProfile( 25 | OktaObject 26 | ): 27 | """ 28 | A class for TotpUserFactorProfile objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.credential_id = config["credentialId"]\ 35 | if "credentialId" in config else None 36 | else: 37 | self.credential_id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "credentialId": self.credential_id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/u_2_f_user_factor_profile.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class U2FUserFactorProfile( 25 | OktaObject 26 | ): 27 | """ 28 | A class for U2FUserFactorProfile objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.credential_id = config["credentialId"]\ 35 | if "credentialId" in config else None 36 | else: 37 | self.credential_id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "credentialId": self.credential_id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/user_id_string.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.models.org_contact_user\ 22 | import OrgContactUser 23 | 24 | 25 | class UserIdString( 26 | OrgContactUser 27 | ): 28 | """ 29 | A class for UserIdString objects. 30 | """ 31 | 32 | def __init__(self, config=None): 33 | super().__init__(config) 34 | if config: 35 | self.user_id = config["userId"]\ 36 | if "userId" in config else None 37 | else: 38 | self.user_id = None 39 | 40 | def request_format(self): 41 | parent_req_format = super().request_format() 42 | current_obj_format = { 43 | "userId": self.user_id 44 | } 45 | parent_req_format.update(current_obj_format) 46 | return parent_req_format 47 | -------------------------------------------------------------------------------- /okta/models/user_identity_provider_link_request.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class UserIdentityProviderLinkRequest( 25 | OktaObject 26 | ): 27 | """ 28 | A class for UserIdentityProviderLinkRequest objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.external_id = config["externalId"]\ 35 | if "externalId" in config else None 36 | else: 37 | self.external_id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "externalId": self.external_id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/user_next_login.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class UserNextLogin( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for UserNextLogin. 30 | """ 31 | 32 | CHANGE_PASSWORD = "changePassword", "CHANGEPASSWORD" 33 | -------------------------------------------------------------------------------- /okta/models/user_schema_attribute_master_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class UserSchemaAttributeMasterType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for UserSchemaAttributeMasterType. 30 | """ 31 | 32 | PROFILE_MASTER = "PROFILE_MASTER", "profile_master" 33 | OKTA = "OKTA", "okta" 34 | OVERRIDE = "OVERRIDE", "override" 35 | -------------------------------------------------------------------------------- /okta/models/user_schema_attribute_scope.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class UserSchemaAttributeScope( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for UserSchemaAttributeScope. 30 | """ 31 | 32 | SELF = "SELF", "self" 33 | NONE = "NONE", "none" 34 | -------------------------------------------------------------------------------- /okta/models/user_schema_attribute_type.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class UserSchemaAttributeType( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for UserSchemaAttributeType. 30 | """ 31 | 32 | STRING = "string", "STRING" 33 | BOOLEAN = "boolean", "BOOLEAN" 34 | NUMBER = "number", "NUMBER" 35 | INTEGER = "integer", "INTEGER" 36 | ARRAY = "array", "ARRAY" 37 | -------------------------------------------------------------------------------- /okta/models/user_schema_attribute_union.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class UserSchemaAttributeUnion( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for UserSchemaAttributeUnion. 30 | """ 31 | 32 | DISABLE = "DISABLE", "disable" 33 | ENABLE = "ENABLE", "enable" 34 | -------------------------------------------------------------------------------- /okta/models/user_schema_properties_profile_item.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class UserSchemaPropertiesProfileItem( 25 | OktaObject 26 | ): 27 | """ 28 | A class for UserSchemaPropertiesProfileItem objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.ref = config["ref"]\ 35 | if "ref" in config else None 36 | else: 37 | self.ref = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "$ref": self.ref 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/user_status.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class UserStatus( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for UserStatus. 30 | """ 31 | 32 | ACTIVE = "ACTIVE", "active" 33 | DEPROVISIONED = "DEPROVISIONED", "deprovisioned" 34 | LOCKED_OUT = "LOCKED_OUT", "locked_out" 35 | PASSWORD_EXPIRED = "PASSWORD_EXPIRED", "password_expired" 36 | PROVISIONED = "PROVISIONED", "provisioned" 37 | RECOVERY = "RECOVERY", "recovery" 38 | STAGED = "STAGED", "staged" 39 | SUSPENDED = "SUSPENDED", "suspended" 40 | -------------------------------------------------------------------------------- /okta/models/user_status_policy_rule_condition.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class UserStatusPolicyRuleCondition( 25 | OktaObject 26 | ): 27 | """ 28 | A class for UserStatusPolicyRuleCondition objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.value = config["value"]\ 35 | if "value" in config else None 36 | else: 37 | self.value = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "value": self.value 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/models/user_verification_enum.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from aenum import MultiValueEnum 22 | 23 | 24 | class UserVerificationEnum( 25 | str, 26 | MultiValueEnum 27 | ): 28 | """ 29 | An enumeration class for UserVerificationEnum. 30 | """ 31 | 32 | REQUIRED = "REQUIRED", "required" 33 | PREFERRED = "PREFERRED", "preferred" 34 | -------------------------------------------------------------------------------- /okta/models/web_user_factor_profile.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | """ 3 | Copyright 2020 - Present Okta, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | """ 17 | 18 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 19 | # SEE CONTRIBUTOR DOCUMENTATION 20 | 21 | from okta.okta_object import OktaObject 22 | 23 | 24 | class WebUserFactorProfile( 25 | OktaObject 26 | ): 27 | """ 28 | A class for WebUserFactorProfile objects. 29 | """ 30 | 31 | def __init__(self, config=None): 32 | super().__init__(config) 33 | if config: 34 | self.credential_id = config["credentialId"]\ 35 | if "credentialId" in config else None 36 | else: 37 | self.credential_id = None 38 | 39 | def request_format(self): 40 | parent_req_format = super().request_format() 41 | current_obj_format = { 42 | "credentialId": self.credential_id 43 | } 44 | parent_req_format.update(current_obj_format) 45 | return parent_req_format 46 | -------------------------------------------------------------------------------- /okta/okta_collection.py: -------------------------------------------------------------------------------- 1 | class OktaCollection(): 2 | "Class to build lists composed of OktaObject datatypes" 3 | 4 | @staticmethod 5 | def form_list(collection: list, data_type: type): 6 | if not collection: 7 | # If empty list or None 8 | return [] 9 | for index in range(len(collection)): 10 | if not OktaCollection.is_formed(collection[index], data_type): 11 | collection[index] = data_type(collection[index]) 12 | return collection 13 | 14 | @staticmethod 15 | def is_formed(value, data_type: type): 16 | return isinstance(value, data_type) 17 | -------------------------------------------------------------------------------- /okta/okta_object.py: -------------------------------------------------------------------------------- 1 | from aenum import MultiValueEnum 2 | 3 | 4 | class OktaObject: 5 | """ 6 | Base object for all Okta datatypes 7 | """ 8 | 9 | def __init__(self, config=None): 10 | pass 11 | 12 | def __repr__(self): 13 | return str(vars(self)) 14 | 15 | def as_dict(self): 16 | """ 17 | Returns dictionary object of 18 | {{pascalCase model.modelName}} object. 19 | """ 20 | result = {} 21 | for key, val in self.request_format().items(): 22 | if val is None: 23 | continue 24 | if isinstance(val, list): 25 | formatted_list = [] 26 | for item in val: 27 | if isinstance(item, OktaObject): 28 | formatted_list.append(item.as_dict()) 29 | else: 30 | formatted_list.append(item) 31 | result[key] = formatted_list 32 | elif not isinstance(val, OktaObject): 33 | result[key] = val 34 | elif issubclass(type(val), MultiValueEnum): 35 | result[key] = val.value 36 | else: 37 | result[key] = val.as_dict() 38 | return result 39 | 40 | def request_format(self): 41 | return {} 42 | -------------------------------------------------------------------------------- /okta/resource_clients/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/okta/resource_clients/__init__.py -------------------------------------------------------------------------------- /okta/user_agent.py: -------------------------------------------------------------------------------- 1 | from okta import __version__ as VERSION 2 | 3 | import platform 4 | 5 | 6 | class UserAgent(): 7 | SDK_NAME = "okta-sdk-python" 8 | PYTHON = "python" 9 | 10 | def __init__(self, user_agent_extra=None): 11 | python_version = platform.python_version() 12 | os_name = platform.system() 13 | os_version = platform.release() 14 | self._user_agent_string = (f"{UserAgent.SDK_NAME}/{VERSION} " 15 | f"{UserAgent.PYTHON}/{python_version} " 16 | f"{os_name}/{os_version}") 17 | if (user_agent_extra): 18 | self._user_agent_string += f" {user_agent_extra}" 19 | 20 | def get_user_agent_string(self): 21 | return self._user_agent_string 22 | -------------------------------------------------------------------------------- /openapi/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@okta/openapi": "^2.15.0", 4 | "lodash": "^4.17.21" 5 | }, 6 | "scripts": { 7 | "build": "cd .. && ./openapi/node_modules/.bin/okta-sdk-generator -t ./openapi/templates/ -o .", 8 | "prebuild": "rm -rf ../okta/models ../okta/generated_clients ../okta/client.py" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /openapi/templates/README.md: -------------------------------------------------------------------------------- 1 | # OpenAPI 2 | This directory will be used to hold the templates for the OpenAPI specification. -------------------------------------------------------------------------------- /openapi/templates/models-init.py.hbs: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | {{> partials.copyrightHeader }} 3 | 4 | {{#each models as |model|}} 5 | from okta.models import {{snakeCase model.modelName}} as {{snakeCase model.modelName}} 6 | {{pascalCase model.modelName}} = {{snakeCase model.modelName}}.{{pascalCase model.modelName}} 7 | {{/each}} 8 | -------------------------------------------------------------------------------- /openapi/templates/partials/copyrightHeader.hbs: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2020 - Present Okta, Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | """ 16 | 17 | # AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY 18 | # SEE CONTRIBUTOR DOCUMENTATION 19 | -------------------------------------------------------------------------------- /openapi/templates/resource_client.py.hbs: -------------------------------------------------------------------------------- 1 | {{> partials.copyrightHeader }} 2 | 3 | {{#if (importURLEncode operations)}} 4 | from urllib.parse import urlencode 5 | {{/if}} 6 | {{#if (hasBinaryOps operations)}} 7 | from okta.http_client import HTTPClient 8 | {{/if}} 9 | {{#each (getResourceImports operations) as |import|}} 10 | from okta.models.{{snakeCase import}}\ 11 | import {{pascalCase import}} 12 | {{/each}} 13 | from okta.utils import format_url 14 | from okta.api_client import APIClient 15 | {{#if (returnsApplication operations)}} 16 | from okta.constants import find_app_model 17 | {{/if}} 18 | {{#if (returnsUserFactor operations)}} 19 | from okta.constants import find_factor_model 20 | {{/if}} 21 | {{#if (returnsPolicy operations)}} 22 | from okta.constants import find_policy_model 23 | {{/if}} 24 | {{#if (returnsPolicyRule operations)}} 25 | from okta.constants import find_policy_rule_model 26 | {{/if}} 27 | 28 | 29 | class {{pascalCase resource}}Client(APIClient): 30 | """ 31 | A Client object for the {{pascalCase resource}} resource. 32 | """ 33 | 34 | def __init__(self): 35 | self._base_url = "" 36 | 37 | {{#each operations as |operation|}} 38 | {{> partials.defaultMethod operation=operation}}{{#unless @last}} 39 | {{/unless}} 40 | {{/each}} 41 | -------------------------------------------------------------------------------- /pip-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pip install -r requirements.txt --no-deps python-jose 4 | -------------------------------------------------------------------------------- /regen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./openapi/node_modules/.bin/okta-sdk-generator -t openapi/templates/ -o . -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | aiohttp 2 | flatdict 3 | pyyaml 4 | xmltodict 5 | yarl 6 | pycryptodomex 7 | jwcrypto 8 | pyjwt 9 | aenum 10 | pydash 11 | flake8 12 | 13 | # Testing dependencies 14 | pytest 15 | pytest-asyncio 16 | pytest-mock 17 | pytest-recording 18 | pyfakefs 19 | aenum 20 | pydash 21 | -------------------------------------------------------------------------------- /run_unit_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pytest tests/unit/ -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | 4 | [metadata] 5 | license_files = LICENSE.md -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- 1 | By default integration tests don't query real Okta API. 2 | To query real API env varialbe `MOCK_TESTS` should be present and set to 'False' in any case. 3 | Additionally, provide orgUrl and creds via env variable. Example: 4 | 5 | ```sh 6 | export MOCK_TESTS=false 7 | export OKTA_CLIENT_ORGURL="https://{testOktaDomain}" 8 | export OKTA_CLIENT_TOKEN="{testToken}" 9 | 10 | pytest tests/integration/ 11 | ``` 12 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/tests/__init__.py -------------------------------------------------------------------------------- /tests/integration/data/brand_theme_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/tests/integration/data/brand_theme_background.png -------------------------------------------------------------------------------- /tests/integration/data/brand_theme_favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/tests/integration/data/brand_theme_favicon.ico -------------------------------------------------------------------------------- /tests/integration/data/brand_theme_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/tests/integration/data/brand_theme_logo.png -------------------------------------------------------------------------------- /tests/integration/data/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/okta/okta-sdk-python/e9764a4b24d998b6240c4a1bb5cb2d577a03252e/tests/integration/data/logo.png -------------------------------------------------------------------------------- /tests/integration/test_threat_insight_it.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from tests.mocks import MockOktaClient 3 | from okta.models import ThreatInsightConfiguration 4 | 5 | 6 | class TestThreatInsightConfiguration: 7 | """ 8 | Integration Tests for the Threat Insight Resource 9 | """ 10 | 11 | @pytest.mark.vcr() 12 | @pytest.mark.asyncio 13 | async def test_get_threat_insight_configuration(self, fs): 14 | client = MockOktaClient(fs) 15 | resp, _, err = await client.get_current_configuration() 16 | assert isinstance(resp, ThreatInsightConfiguration) 17 | assert '_links' in resp.as_dict().keys() 18 | assert 'action' in resp.as_dict().keys() 19 | assert 'excludeZones' in resp.as_dict().keys() 20 | 21 | @pytest.mark.vcr() 22 | @pytest.mark.asyncio 23 | async def test_update_threat_insight_configuration(self, fs): 24 | client = MockOktaClient(fs) 25 | old_config, _, err = await client.get_current_configuration() 26 | new_config = old_config 27 | new_config.action = 'audit' 28 | try: 29 | updated_config, _, err = await client.update_configuration(new_config) 30 | assert updated_config.action == 'audit' 31 | finally: 32 | _, _, err = await client.update_configuration(old_config) 33 | assert err is None 34 | -------------------------------------------------------------------------------- /tests/unit/files/PK-sample-global.yaml: -------------------------------------------------------------------------------- 1 | okta: 2 | client: 3 | orgUrl: "https://test.global.okta.com" 4 | authorizationMode: "PrivateKey" 5 | clientId: "clientID-global" 6 | scopes: 7 | - scope.1 8 | - scope.2 9 | privateKey: Private Key Global 10 | -------------------------------------------------------------------------------- /tests/unit/files/PK-sample-local.yaml: -------------------------------------------------------------------------------- 1 | okta: 2 | client: 3 | orgUrl: "https://test.local.okta.com" 4 | authorizationMode: "PrivateKey" 5 | clientId: "clientID-local" 6 | scopes: 7 | - scope.1 8 | - scope.2 9 | privateKey: Private Key Local -------------------------------------------------------------------------------- /tests/unit/files/SSWS-sample-global.yaml: -------------------------------------------------------------------------------- 1 | okta: 2 | client: 3 | orgUrl: "https://test.global.okta.com" 4 | token: apiToken-global 5 | -------------------------------------------------------------------------------- /tests/unit/files/SSWS-sample-local.yaml: -------------------------------------------------------------------------------- 1 | okta: 2 | client: 3 | orgUrl: "https://test.local.okta.com" 4 | token: apiToken-local 5 | -------------------------------------------------------------------------------- /tests/unit/test_config_setter.py: -------------------------------------------------------------------------------- 1 | from okta.config.config_setter import ConfigSetter 2 | 3 | """ 4 | Testing Config Setter 5 | """ 6 | 7 | def test_env_variable_application(monkeypatch): 8 | config_setter = ConfigSetter() 9 | config_setter._apply_default_values() 10 | 11 | assert config_setter._config["client"]["oauthTokenRenewalOffset"] == 5 12 | -------------------------------------------------------------------------------- /tests/unit/test_config_validator.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from okta.config.config_validator import ConfigValidator 3 | 4 | """ 5 | Testing Config Validator 6 | """ 7 | 8 | def test_validate_config_valid(): 9 | config = { 10 | "client": { 11 | "orgUrl": "https://example.okta.com", 12 | "authorizationMode": "PrivateKey", 13 | "clientId": "valid-client-id", 14 | "scopes": ["scope1", "scope2"], 15 | "privateKey": "valid-private-key", 16 | "oauthTokenRenewalOffset": 5 17 | }, 18 | "testing": { 19 | "testingDisableHttpsCheck": False 20 | } 21 | } 22 | validator = ConfigValidator(config) 23 | assert validator.validate_config() is None 24 | 25 | def test_validate_config_invalid_org_url(): 26 | config = { 27 | "client": { 28 | "orgUrl": "http://example.okta.com", 29 | "authorizationMode": "PrivateKey", 30 | "clientId": "valid-client-id", 31 | "scopes": ["scope1", "scope2"], 32 | "privateKey": "valid-private-key", 33 | "oauthTokenRenewalOffset": 5 34 | }, 35 | "testing": { 36 | "testingDisableHttpsCheck": False 37 | } 38 | } 39 | with pytest.raises(ValueError) as excinfo: 40 | ConfigValidator(config) 41 | assert "must start with 'https'." in str(excinfo.value) -------------------------------------------------------------------------------- /tests/unit/test_constants.py: -------------------------------------------------------------------------------- 1 | import okta.models as models 2 | from okta.constants import find_app_model 3 | 4 | def test_find_app_model(): 5 | expected = models.SamlApplication 6 | actual = find_app_model('SAML_1_1', 'office365') 7 | assert expected == actual 8 | 9 | expected = models.SwaApplication 10 | actual = find_app_model(None, 'template_swa') 11 | assert expected == actual 12 | 13 | expected = models.Application 14 | actual = find_app_model(None, 'unknown_application') 15 | assert expected == actual 16 | -------------------------------------------------------------------------------- /tests/unit/test_helpers.py: -------------------------------------------------------------------------------- 1 | from okta import helpers 2 | 3 | 4 | def test_to_snake_case(): 5 | assert helpers.to_snake_case('string') == 'string' 6 | assert helpers.to_snake_case('CamelCaseStr') == 'camel_case_str' 7 | assert helpers.to_snake_case('lowerCamelCaseStr') == 'lower_camel_case_str' 8 | assert helpers.to_snake_case('snake_case_str') == 'snake_case_str' 9 | 10 | 11 | def test_to_lower_camel_case(): 12 | assert helpers.to_lower_camel_case('') == '' 13 | assert helpers.to_lower_camel_case('string') == 'string' 14 | assert helpers.to_lower_camel_case('CamelCaseStr') == 'camelCaseStr' 15 | assert helpers.to_lower_camel_case('lowerCamelCaseStr') == 'lowerCamelCaseStr' 16 | assert helpers.to_lower_camel_case('snake_case_str') == 'snakeCaseStr' 17 | assert helpers.to_lower_camel_case('_start_with_underscore') == 'StartWithUnderscore' 18 | assert helpers.to_lower_camel_case('__start_with_double_underscore') == 'StartWithDoubleUnderscore' 19 | assert helpers.to_lower_camel_case('__double_underscores__') == 'DoubleUnderscores' 20 | -------------------------------------------------------------------------------- /tests/unit/test_jwt.py: -------------------------------------------------------------------------------- 1 | from okta.jwt import JWT 2 | import tests.mocks as mocks 3 | 4 | """ 5 | Testing JWT functions with different inputs 6 | """ 7 | 8 | 9 | def test_private_key_with_kid_in_private_key(mocker): 10 | mocked_encode = mocker.patch('okta.jwt.jwt_encode') 11 | JWT.create_token("test.com", "test-client-id", mocks.SAMPLE_JWK_WITH_KID) 12 | expected_kid = mocks.SAMPLE_JWK_WITH_KID["kid"] 13 | args = mocked_encode.call_args.args 14 | mocked_encode.assert_called_once() 15 | assert "kid" in args[-1] 16 | assert args[-1]["kid"] == expected_kid 17 | 18 | 19 | def test_private_key_with_kid_in_config(mocker): 20 | mocked_encode = mocker.patch('okta.jwt.jwt_encode') 21 | expected_kid = "test-kid" 22 | JWT.create_token("test.com", "test-client-id", mocks.SAMPLE_JWK, kid=expected_kid) 23 | args = mocked_encode.call_args.args 24 | mocked_encode.assert_called_once() 25 | assert "kid" in args[-1] 26 | assert args[-1]["kid"] == expected_kid 27 | -------------------------------------------------------------------------------- /tests/unit/test_logger.py: -------------------------------------------------------------------------------- 1 | from okta.client import Client as OktaClient 2 | import logging 3 | import pytest 4 | 5 | 6 | @pytest.mark.parametrize('log_level', [logging.INFO, logging.ERROR, logging.WARNING, logging.DEBUG]) 7 | def test_client_log_level_set_correctly(log_level: int): 8 | org_url = "https://test.okta.com" 9 | token = "TOKEN" 10 | config = { 11 | 'orgUrl': org_url, 12 | 'token': token, 13 | 'logging': { 14 | 'enabled': True, 15 | 'logLevel': log_level 16 | } 17 | } 18 | 19 | # Ensure no error is raised and logger is set to correct level 20 | _ = OktaClient(user_config=config) 21 | assert logging.getLogger('okta-sdk-python').getEffectiveLevel() == log_level 22 | 23 | 24 | def test_client_log_level_set_correctly_default(): 25 | org_url = "https://test.okta.com" 26 | token = "TOKEN" 27 | config = { 28 | 'orgUrl': org_url, 29 | 'token': token, 30 | 'logging': { 31 | 'enabled': True 32 | } 33 | } 34 | 35 | # Ensure no error is raised and logger is set to correct level (INFO) 36 | _ = OktaClient(user_config=config) 37 | assert logging.getLogger('okta-sdk-python').getEffectiveLevel() == logging.INFO 38 | -------------------------------------------------------------------------------- /tests/unit/test_oauth_clear_access_token.py: -------------------------------------------------------------------------------- 1 | from okta.oauth import OAuth 2 | 3 | """ 4 | Testing OAuth.clear_access_token 5 | """ 6 | class WasCalled: 7 | def __init__(self): 8 | self.value = False 9 | 10 | cache_delete_was_called = WasCalled 11 | headers_pop_was_called = WasCalled 12 | 13 | class mockCache: 14 | def delete(token): 15 | cache_delete_was_called.value = True 16 | 17 | class mockHeaders: 18 | def pop(header, ignored): 19 | headers_pop_was_called.value = True 20 | 21 | class mockRequestExecutor: 22 | def __init__(self, cache): 23 | self._cache = cache 24 | self._default_headers = mockHeaders 25 | 26 | def test_oauth_clear_access_token(): 27 | _mockRequestExecutor = mockRequestExecutor(mockCache) 28 | oauth = OAuth(_mockRequestExecutor, {}) 29 | oauth.clear_access_token() 30 | assert cache_delete_was_called.value 31 | assert headers_pop_was_called.value 32 | 33 | -------------------------------------------------------------------------------- /tests/unit/test_utils.py: -------------------------------------------------------------------------------- 1 | from okta.utils import convert_absolute_url_into_relative_url 2 | 3 | 4 | def test_convert_absolute_url_into_relative_url(): 5 | absolute_url = 'https://test.okta.com/api/v1/users' 6 | relative_url = '/api/v1/users' 7 | assert relative_url == convert_absolute_url_into_relative_url(absolute_url) 8 | 9 | absolute_url = 'https://test.okta.com/api/v1/users?activate=false' 10 | relative_url = '/api/v1/users?activate=false' 11 | assert relative_url == convert_absolute_url_into_relative_url(absolute_url) 12 | -------------------------------------------------------------------------------- /tests/utils.py: -------------------------------------------------------------------------------- 1 | import string 2 | import random 3 | 4 | """ 5 | File for utility functions used in testing 6 | """ 7 | 8 | 9 | def random_string_of_length(length): 10 | """ 11 | Generates a random string of ASCII letters of a fixed length. 12 | 13 | Args: 14 | length (int): fixed length desired 15 | 16 | Returns: 17 | string: random string generated 18 | """ 19 | return "".join(random.choices(string.ascii_letters, k=length)) 20 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py38, py37, py36, py39 3 | skip_missing_interpreters=True 4 | [testenv] 5 | # install testing framework 6 | deps = 7 | pytest 8 | flake8 9 | -rrequirements.txt 10 | # run the tests 11 | commands = 12 | python -c 'print("Running Unit Tests...")' 13 | pytest tests/unit/ 14 | python -c 'print("Unit Tests Succesful!")' 15 | python -c 'print("Running Integration Tests...")' 16 | pytest tests/integration/ 17 | python -c 'print("Integration Tests Succesful!")' 18 | python -c 'print("Checking Code Style (Flake8)...")' 19 | flake8 okta 20 | flake8 tests 21 | python -c 'print("Flake8 Check Succesful!")' 22 | 23 | [pytest] 24 | minversion = 5.4.0 25 | addopts = -ra -q -v 26 | testpaths = 27 | tests 28 | --------------------------------------------------------------------------------