How to use the okta.models.user_factor.UserFactor function in okta

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

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

github okta / okta-sdk-python / okta / models / u_2_f_user_factor.py View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.u_2_f_user_factor_profile\
    import U2FUserFactorProfile


class U2FUserFactor(
    UserFactor
):
    """
    A class for U2FUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            if "profile" in config:
                if isinstance(config["profile"],
                              U2FUserFactorProfile):
                    self.profile = config["profile"]
                else:
                    self.profile = U2FUserFactorProfile(
                        config["profile"]
                    )
github okta / okta-sdk-python / okta / models / security_question_user_factor.py View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.security_question_user_factor_profile\
    import SecurityQuestionUserFactorProfile


class SecurityQuestionUserFactor(
    UserFactor
):
    """
    A class for SecurityQuestionUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            if "profile" in config:
                if isinstance(config["profile"],
                              SecurityQuestionUserFactorProfile):
                    self.profile = config["profile"]
                else:
                    self.profile = SecurityQuestionUserFactorProfile(
                        config["profile"]
                    )
github okta / okta-sdk-python / okta / models / web_user_factor.py View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.web_user_factor_profile\
    import WebUserFactorProfile


class WebUserFactor(
    UserFactor
):
    """
    A class for WebUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            if "profile" in config:
                if isinstance(config["profile"],
                              WebUserFactorProfile):
                    self.profile = config["profile"]
                else:
                    self.profile = WebUserFactorProfile(
                        config["profile"]
                    )
github okta / okta-sdk-python / okta / models / push_user_factor.py View on Github external
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.factor_result_type\
    import FactorResultType
from okta.models.push_user_factor_profile\
    import PushUserFactorProfile


class PushUserFactor(
    UserFactor
):
    """
    A class for PushUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            self.expires_at = config["expiresAt"]\
                if "expiresAt" in config else None
            if "factorResult" in config:
                if isinstance(config["factorResult"],
                              FactorResultType):
                    self.factor_result = config["factorResult"]
                else:
                    self.factor_result = FactorResultType(
github okta / okta-sdk-python / okta / models / sms_user_factor.py View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.sms_user_factor_profile\
    import SmsUserFactorProfile


class SmsUserFactor(
    UserFactor
):
    """
    A class for SmsUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            if "profile" in config:
                if isinstance(config["profile"],
                              SmsUserFactorProfile):
                    self.profile = config["profile"]
                else:
                    self.profile = SmsUserFactorProfile(
                        config["profile"]
                    )
github okta / okta-sdk-python / okta / models / token_user_factor.py View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.token_user_factor_profile\
    import TokenUserFactorProfile


class TokenUserFactor(
    UserFactor
):
    """
    A class for TokenUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            if "profile" in config:
                if isinstance(config["profile"],
                              TokenUserFactorProfile):
                    self.profile = config["profile"]
                else:
                    self.profile = TokenUserFactorProfile(
                        config["profile"]
                    )
github okta / okta-sdk-python / okta / models / hardware_user_factor.py View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.hardware_user_factor_profile\
    import HardwareUserFactorProfile


class HardwareUserFactor(
    UserFactor
):
    """
    A class for HardwareUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            if "profile" in config:
                if isinstance(config["profile"],
                              HardwareUserFactorProfile):
                    self.profile = config["profile"]
                else:
                    self.profile = HardwareUserFactorProfile(
                        config["profile"]
                    )
github okta / okta-sdk-python / okta / models / email_user_factor.py View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.email_user_factor_profile\
    import EmailUserFactorProfile


class EmailUserFactor(
    UserFactor
):
    """
    A class for EmailUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            if "profile" in config:
                if isinstance(config["profile"],
                              EmailUserFactorProfile):
                    self.profile = config["profile"]
                else:
                    self.profile = EmailUserFactorProfile(
                        config["profile"]
                    )
github okta / okta-sdk-python / okta / resource_clients / user_factor_client.py View on Github external
http_method, api_url, body, headers
        )

        if error:
            return (None, None, error)

        response, error = await self._request_executor\
            .execute(request, UserFactor)

        if error:
            return (None, response, error)

        try:
            result = []
            for item in response.get_body():
                result.append(UserFactor(item))
        except Exception as error:
            return (None, response, error)
        return (result, response, None)
github okta / okta-sdk-python / okta / models / call_user_factor.py View on Github external
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

# AUTO-GENERATED! DO NOT EDIT FILE DIRECTLY
# SEE CONTRIBUTOR DOCUMENTATION

from okta.models.user_factor\
    import UserFactor
from okta.models.call_user_factor_profile\
    import CallUserFactorProfile


class CallUserFactor(
    UserFactor
):
    """
    A class for CallUserFactor objects.
    """

    def __init__(self, config=None):
        super().__init__(config)
        if config:
            if "profile" in config:
                if isinstance(config["profile"],
                              CallUserFactorProfile):
                    self.profile = config["profile"]
                else:
                    self.profile = CallUserFactorProfile(
                        config["profile"]
                    )