Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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"]
)
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"]
)
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"]
)
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(
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"]
)
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"]
)
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"]
)
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"]
)
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)
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"]
)