Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/ApplicationSignOnMode.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ApplicationSignOnMode

Authentication mode for the app | signOnMode | Description | | ---------- | ----------- | | AUTO_LOGIN | Secure Web Authentication (SWA) | | BASIC_AUTH | HTTP Basic Authentication with Okta Browser Plugin | | BOOKMARK | Just a bookmark (no-authentication) | | BROWSER_PLUGIN | Secure Web Authentication (SWA) with Okta Browser Plugin | | OPENID_CONNECT | Federated Authentication with OpenID Connect (OIDC) | | SAML_1_1 | Federated Authentication with SAML 1.1 WebSSO (not supported for custom apps) | | SAML_2_0 | Federated Authentication with SAML 2.0 WebSSO | | SECURE_PASSWORD_STORE | Secure Web Authentication (SWA) with POST (plugin not required) | | WS_FEDERATION | Federated Authentication with WS-Federation Passive Requestor Profile | | MFA_AS_SERVICE | Application to use Okta's MFA as a service for RDP | Select the `signOnMode` for your custom app:
Authentication mode for the app | signOnMode | Description | | ---------- | ----------- | | AUTO_LOGIN | Secure Web Authentication (SWA) | | BASIC_AUTH | HTTP Basic Authentication with Okta Browser Plugin | | BOOKMARK | Just a bookmark (no-authentication) | | BROWSER_PLUGIN | Secure Web Authentication (SWA) with Okta Browser Plugin | | OPENID_CONNECT | Federated Authentication with OpenID Connect (OIDC) | | SAML_1_1 | Federated Authentication with SAML 1.1 WebSSO (not supported for custom apps) | | SAML_2_0 | Federated Authentication with SAML 2.0 WebSSO | | SECURE_PASSWORD_STORE | Secure Web Authentication (SWA) with POST (plugin not required) | | WS_FEDERATION | Federated Authentication with WS-Federation Passive Requestor Profile | | MFA_AS_SERVICE | Application to use Okta's MFA as a service for RDP | | OTHER | Unknown Sign on mode | Select the `signOnMode` for your custom app:

## Properties

Expand Down
1 change: 1 addition & 0 deletions okta/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
'BasicAuthApplication',
'BookmarkApplication',
'BrowserPluginApplication',
'Application'
Comment thread
BinoyOza-okta marked this conversation as resolved.
Outdated
'OpenIdConnectApplication',
'Saml11Application',
'SamlApplication',
Expand Down
6 changes: 5 additions & 1 deletion okta/models/action_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
Comment thread
BinoyOza-okta marked this conversation as resolved.
Outdated
return "ActionProvider"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "AppConfig"
else:
return None

Expand Down
34 changes: 33 additions & 1 deletion okta/models/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
from okta.models.browser_plugin_application import BrowserPluginApplication
from okta.models.application import Application
from okta.models.open_id_connect_application import OpenIdConnectApplication
from okta.models.application import Application
Comment thread
BinoyOza-okta marked this conversation as resolved.
Outdated
from okta.models.saml11_application import Saml11Application
from okta.models.saml_application import SamlApplication
from okta.models.secure_password_store_application import (
Expand Down Expand Up @@ -108,6 +109,8 @@ class Application(BaseModel): # noqa: F811
visibility: Optional[ApplicationVisibility] = None
embedded: Optional[ApplicationEmbedded] = Field(default=None, alias="_embedded")
links: Optional[ApplicationLinks] = Field(default=None, alias="_links")
# Store the original sign-on mode value when it's not in the enum
_original_sign_on_mode: Optional[str] = None
Comment thread
BinoyOza-okta marked this conversation as resolved.
Outdated
__properties: ClassVar[List[str]] = [
"accessibility",
"created",
Expand Down Expand Up @@ -212,6 +215,7 @@ def features_validate_enum(cls, value):
"BROWSER_PLUGIN": "BrowserPluginApplication",
"MFA_AS_SERVICE": "Application",
"OPENID_CONNECT": "OpenIdConnectApplication",
"OTHER": "Application",
"SAML_1_1": "Saml11Application",
"SAML_2_0": "SamlApplication",
"SECURE_PASSWORD_STORE": "SecurePasswordStoreApplication",
Expand All @@ -223,7 +227,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "Application"
else:
return None

Expand All @@ -245,6 +253,7 @@ def from_json(cls, json_str: str) -> Optional[
BrowserPluginApplication,
Application,
OpenIdConnectApplication,
Application,
Saml11Application,
SamlApplication,
SecurePasswordStoreApplication,
Expand Down Expand Up @@ -333,6 +342,9 @@ def to_dict(self) -> Dict[str, Any]:
else:
_dict["_links"] = self.links

# If we have an original sign-on mode (was unknown), return it instead of OTHER
if self._original_sign_on_mode:
_dict["signOnMode"] = self._original_sign_on_mode
return _dict

@classmethod
Expand All @@ -344,6 +356,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[
BrowserPluginApplication,
Application,
OpenIdConnectApplication,
Application,
Saml11Application,
SamlApplication,
SecurePasswordStoreApplication,
Expand Down Expand Up @@ -378,13 +391,32 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[
if object_type == "Application":
# Check if the discriminator maps to the same class to avoid infinite recursion
if object_type == cls.__name__:
# Handle unknown sign-on modes
original_discriminator = obj.get(cls.__discriminator_property_name)
if (
original_discriminator
and original_discriminator
not in cls.__discriminator_value_class_map
):
# Store the original value and replace with OTHER
obj_copy = obj.copy()
# Note: This assumes an OTHER value exists in the discriminator enum
obj_copy[cls.__discriminator_property_name] = "OTHER"
instance = cls.model_validate(obj_copy)
instance._original_sign_on_mode = original_discriminator
return instance
return cls.model_validate(obj)
return models.Application.from_dict(obj)
if object_type == "OpenIdConnectApplication":
# Check if the discriminator maps to the same class to avoid infinite recursion
if object_type == cls.__name__:
return cls.model_validate(obj)
return models.OpenIdConnectApplication.from_dict(obj)
if object_type == "Application":
Comment thread
BinoyOza-okta marked this conversation as resolved.
Outdated
# Check if the discriminator maps to the same class to avoid infinite recursion
if object_type == cls.__name__:
return cls.model_validate(obj)
return models.Application.from_dict(obj)
if object_type == "Saml11Application":
# Check if the discriminator maps to the same class to avoid infinite recursion
if object_type == cls.__name__:
Expand Down
6 changes: 5 additions & 1 deletion okta/models/application_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "ApplicationFeature"
else:
return None

Expand Down
1 change: 1 addition & 0 deletions okta/models/application_sign_on_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class ApplicationSignOnMode(str, Enum):
SECURE_PASSWORD_STORE = "SECURE_PASSWORD_STORE"
WS_FEDERATION = "WS_FEDERATION"
MFA_AS_SERVICE = "MFA_AS_SERVICE"
OTHER = "OTHER"
Comment thread
BinoyOza-okta marked this conversation as resolved.
Outdated

@classmethod
def from_json(cls, json_str: str) -> Self:
Expand Down
6 changes: 5 additions & 1 deletion okta/models/authenticator_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "AuthenticatorBase"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/authenticator_method_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "AuthenticatorMethodBase"
else:
return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "AuthenticatorMethodWithVerifiableProperties"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/authenticator_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "AuthenticatorSimple"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/available_action_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "AvailableActionProvider"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/behavior_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "BehaviorRule"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/device_assurance.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "DeviceAssurance"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/enrollment_policy_authenticator_grace_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "EnrollmentPolicyAuthenticatorGracePeriod"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/inline_hook_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "InlineHookChannel"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/inline_hook_channel_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "InlineHookChannelCreate"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/log_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "LogStream"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/log_stream_put_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "LogStreamPutSchema"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/network_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "NetworkZone"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/o_auth2_client_json_signing_key_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "OAuth2ClientJsonSigningKeyResponse"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "Policy"
else:
return None

Expand Down
6 changes: 5 additions & 1 deletion okta/models/policy_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]:
"""Returns the discriminator value (object type) of the data"""
discriminator_value = obj[cls.__discriminator_property_name]
if discriminator_value:
return cls.__discriminator_value_class_map.get(discriminator_value)
mapped_class = cls.__discriminator_value_class_map.get(discriminator_value)
if mapped_class:
return mapped_class
# If not in mapping, return base class (will be handled by post-processing for Application)
return "PolicyRule"
else:
return None

Expand Down
Loading
Loading