Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
32 changes: 32 additions & 0 deletions docs/UserFactorSignedNonce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# UserFactorSignedNonce

`signed_nonce` is the factor type for [Okta FastPass](https://help.okta.com/oie/en-us/content/topics/identity-engine/devices/fp/fp-main.htm). You can't use the Factors API to enroll or activate Okta FastPass (`signed_nonce`) for a user. Use the [Okta Verify](https://help.okta.com/en-us/content/topics/mobile/okta-verify-overview.htm) authenticator enrollment flow instead. You can use the Factors API to list and delete `signed_nonce` factors.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**factor_type** | **object** | | [optional]
**profile** | [**UserFactorSignedNonceProfile**](UserFactorSignedNonceProfile.md) | | [optional]
**provider** | **str** | | [optional]

## Example

```python
from okta.models.user_factor_signed_nonce import UserFactorSignedNonce

# TODO update the JSON string below
json = "{}"
# create an instance of UserFactorSignedNonce from a JSON string
user_factor_signed_nonce_instance = UserFactorSignedNonce.from_json(json)
# print the JSON string representation of the object
print(UserFactorSignedNonce.to_json())

# convert the object into a dict
user_factor_signed_nonce_dict = user_factor_signed_nonce_instance.to_dict()
# create an instance of UserFactorSignedNonce from a dict
user_factor_signed_nonce_from_dict = UserFactorSignedNonce.from_dict(user_factor_signed_nonce_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


35 changes: 35 additions & 0 deletions docs/UserFactorSignedNonceProfile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# UserFactorSignedNonceProfile

Profile for the Okta FastPass (signed nonce) factor

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**credential_id** | **str** | ID for the factor credential | [optional]
**device_type** | **str** | Type of device | [optional]
**name** | **str** | Name of the device | [optional]
**platform** | **str** | OS platform of the associated device | [optional]
**version** | **str** | OS version of the associated device | [optional]
**keys** | [**List[UserFactorSignedNonceProfileKey]**](UserFactorSignedNonceProfileKey.md) | Cryptographic keys associated with the signed nonce factor | [optional]

## Example

```python
from okta.models.user_factor_signed_nonce_profile import UserFactorSignedNonceProfile

# TODO update the JSON string below
json = "{}"
# create an instance of UserFactorSignedNonceProfile from a JSON string
user_factor_signed_nonce_profile_instance = UserFactorSignedNonceProfile.from_json(json)
# print the JSON string representation of the object
print(UserFactorSignedNonceProfile.to_json())

# convert the object into a dict
user_factor_signed_nonce_profile_dict = user_factor_signed_nonce_profile_instance.to_dict()
# create an instance of UserFactorSignedNonceProfile from a dict
user_factor_signed_nonce_profile_from_dict = UserFactorSignedNonceProfile.from_dict(user_factor_signed_nonce_profile_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


39 changes: 39 additions & 0 deletions docs/UserFactorSignedNonceProfileKey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# UserFactorSignedNonceProfileKey

JSON Web Key (JWK) for signed nonce verification

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**kty** | **str** | Key type | [optional]
**use** | **str** | Key usage | [optional]
**kid** | **str** | Key ID | [optional]
**jwk_type** | **str** | Purpose of the key | [optional]
**e** | **str** | RSA public exponent (present only for RSA keys) | [optional]
**n** | **str** | RSA modulus (present only for RSA keys) | [optional]
**crv** | **str** | EC curve name (present only for EC keys) | [optional]
**x** | **str** | EC x-coordinate (present only for EC keys) | [optional]
**y** | **str** | EC y-coordinate (present only for EC keys) | [optional]
**x5c** | **List[str]** | X.509 certificate chain | [optional]

## Example

```python
from okta.models.user_factor_signed_nonce_profile_key import UserFactorSignedNonceProfileKey

# TODO update the JSON string below
json = "{}"
# create an instance of UserFactorSignedNonceProfileKey from a JSON string
user_factor_signed_nonce_profile_key_instance = UserFactorSignedNonceProfileKey.from_json(json)
# print the JSON string representation of the object
print(UserFactorSignedNonceProfileKey.to_json())

# convert the object into a dict
user_factor_signed_nonce_profile_key_dict = user_factor_signed_nonce_profile_key_instance.to_dict()
# create an instance of UserFactorSignedNonceProfileKey from a dict
user_factor_signed_nonce_profile_key_from_dict = UserFactorSignedNonceProfileKey.from_dict(user_factor_signed_nonce_profile_key_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


3 changes: 3 additions & 0 deletions okta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,9 @@
"UserFactorSMSProfile": "okta.models.user_factor_sms_profile",
"UserFactorSecurityQuestion": "okta.models.user_factor_security_question",
"UserFactorSecurityQuestionProfile": "okta.models.user_factor_security_question_profile",
"UserFactorSignedNonce": "okta.models.user_factor_signed_nonce",
"UserFactorSignedNonceProfile": "okta.models.user_factor_signed_nonce_profile",
"UserFactorSignedNonceProfileKey": "okta.models.user_factor_signed_nonce_profile_key",
"UserFactorStatus": "okta.models.user_factor_status",
"UserFactorSupported": "okta.models.user_factor_supported",
"UserFactorToken": "okta.models.user_factor_token",
Expand Down
4 changes: 4 additions & 0 deletions okta/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
'UserFactorEmail',
'UserFactorPush',
'UserFactorSecurityQuestion',
"UserFactorSignedNonce",
'UserFactorSMS',
'UserFactorToken',
'UserFactorTokenHardware',
Expand Down Expand Up @@ -2004,6 +2005,9 @@
"UserFactorSMSProfile": "okta.models.user_factor_sms_profile",
"UserFactorSecurityQuestion": "okta.models.user_factor_security_question",
"UserFactorSecurityQuestionProfile": "okta.models.user_factor_security_question_profile",
"UserFactorSignedNonce": "okta.models.user_factor_signed_nonce",
"UserFactorSignedNonceProfile": "okta.models.user_factor_signed_nonce_profile",
"UserFactorSignedNonceProfileKey": "okta.models.user_factor_signed_nonce_profile_key",
"UserFactorStatus": "okta.models.user_factor_status",
"UserFactorSupported": "okta.models.user_factor_supported",
"UserFactorToken": "okta.models.user_factor_token",
Expand Down
9 changes: 9 additions & 0 deletions okta/models/user_factor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from okta.models.user_factor_email import UserFactorEmail
from okta.models.user_factor_push import UserFactorPush
from okta.models.user_factor_security_question import UserFactorSecurityQuestion
from okta.models.user_factor_signed_nonce import UserFactorSignedNonce
from okta.models.user_factor_sms import UserFactorSMS
from okta.models.user_factor_token import UserFactorToken
from okta.models.user_factor_token_hardware import UserFactorTokenHardware
Expand Down Expand Up @@ -113,6 +114,7 @@ class UserFactor(BaseModel):
"email": "UserFactorEmail",
"push": "UserFactorPush",
"question": "UserFactorSecurityQuestion",
"signed_nonce": "UserFactorSignedNonce",
"sms": "UserFactorSMS",
"token": "UserFactorToken",
"token:hardware": "UserFactorTokenHardware",
Expand Down Expand Up @@ -148,6 +150,7 @@ def from_json(cls, json_str: str) -> Optional[
UserFactorEmail,
UserFactorPush,
UserFactorSecurityQuestion,
UserFactorSignedNonce,
UserFactorSMS,
UserFactorToken,
UserFactorTokenHardware,
Expand Down Expand Up @@ -207,6 +210,7 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[
UserFactorEmail,
UserFactorPush,
UserFactorSecurityQuestion,
UserFactorSignedNonce,
UserFactorSMS,
UserFactorToken,
UserFactorTokenHardware,
Expand Down Expand Up @@ -242,6 +246,11 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[
if object_type == cls.__name__:
return cls.model_validate(obj)
return models.UserFactorSecurityQuestion.from_dict(obj)
if object_type == "UserFactorSignedNonce":
# 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.UserFactorSignedNonce.from_dict(obj)
if object_type == "UserFactorSMS":
# Check if the discriminator maps to the same class to avoid infinite recursion
if object_type == cls.__name__:
Expand Down
163 changes: 163 additions & 0 deletions okta/models/user_factor_signed_nonce.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# The Okta software accompanied by this notice is provided pursuant to the following terms:
# Copyright © 2025-Present, Okta, Inc.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
# License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.
# coding: utf-8

"""
Okta Admin Management

Allows customers to easily access the Okta Management APIs

The version of the OpenAPI document: 5.1.0
Contact: devex-public@okta.com
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set

from pydantic import ConfigDict, Field, StrictStr, field_validator
from typing_extensions import Self

from okta.models.user_factor import UserFactor
from okta.models.user_factor_links import UserFactorLinks
from okta.models.user_factor_signed_nonce_profile import UserFactorSignedNonceProfile


class UserFactorSignedNonce(UserFactor):
"""
`signed_nonce` is the factor type for [Okta FastPass](
https://help.okta.com/oie/en-us/content/topics/identity-engine/devices/fp/fp-main.htm). You can't use the Factors API to
enroll or activate Okta FastPass (`signed_nonce`) for a user. Use the [Okta Verify](
https://help.okta.com/en-us/content/topics/mobile/okta-verify-overview.htm) authenticator enrollment flow instead. You
can use the Factors API to list and delete `signed_nonce` factors.
""" # noqa: E501

factor_type: Optional[Any] = Field(default=None, alias="factorType")
profile: Optional[UserFactorSignedNonceProfile] = None
provider: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = [
"created",
"factorType",
"id",
"lastUpdated",
"profile",
"provider",
"status",
"vendorName",
"_embedded",
"_links",
]

@field_validator("provider")
def provider_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(["OKTA"]):
raise ValueError("must be one of enum values ('OKTA')")
return value

model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)

def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of UserFactorSignedNonce from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of profile
if self.profile:
if not isinstance(self.profile, dict):
_dict["profile"] = self.profile.to_dict()
else:
_dict["profile"] = self.profile

# override the default output from pydantic by calling `to_dict()` of links
if self.links:
if not isinstance(self.links, dict):
_dict["_links"] = self.links.to_dict()
else:
_dict["_links"] = self.links

# set to None if factor_type (nullable) is None
# and model_fields_set contains the field
if self.factor_type is None and "factor_type" in self.model_fields_set:
_dict["factorType"] = None

return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of UserFactorSignedNonce from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate(
{
"created": obj.get("created"),
"factorType": obj.get("factorType"),
"id": obj.get("id"),
"lastUpdated": obj.get("lastUpdated"),
"profile": (
UserFactorSignedNonceProfile.from_dict(obj["profile"])
if obj.get("profile") is not None
else None
),
"provider": obj.get("provider"),
"status": obj.get("status"),
"vendorName": obj.get("vendorName"),
"_embedded": obj.get("_embedded"),
"_links": (
UserFactorLinks.from_dict(obj["_links"])
if obj.get("_links") is not None
else None
),
}
)
return _obj
Loading