Instance Configuration_MFA

a class based approach to configuring your domo instance
community_auth = dmda.DomoTokenAuth(
    domo_instance=os.environ["DOMO_INSTANCE"],
    domo_access_token=os.environ["DOMO_ACCESS_TOKEN"],
)

await community_auth.print_is_token()

auth = dmda.DomoTokenAuth(
    domo_instance=os.environ["DOMO_DATACREW_INSTANCE"],
    domo_access_token=os.environ["DOMO_DATACREW_ACCESS_TOKEN"],
)
await auth.print_is_token()
🎉 token_auth token retrieved from domo-community ⚙️
🎉 token_auth token retrieved from datacrew-space ⚙️
True

MFA Configuration


source

MFA_Config

 MFA_Config (auth:domolibrary.client.DomoAuth.DomoAuth,
             is_multifactor_required:bool=None,
             max_code_attempts:int=None, num_days_valid:int=None)

source

MFAConfig_InstantiationError

 MFAConfig_InstantiationError (message,
                               auth:domolibrary.client.DomoAuth.DomoAuth,
                               cls)

base exception

# sample getting mfa config from domo instance
await MFA_Config.get_instance_config(auth=community_auth, return_raw=False, debug_num_stacks_to_drop=2)
MFA_Config(is_multifactor_required=False, max_code_attempts=5, num_days_valid=15)
mfa_config = await MFA_Config.get_instance_config(
    auth=auth, return_raw=False, debug_num_stacks_to_drop=2
)

await mfa_config.toggle_mfa(is_enable_MFA=None, debug_api=False)
MFA_Config(is_multifactor_required=True, max_code_attempts=7, num_days_valid=32)
await mfa_config.update(
    is_enable_MFA=True, max_code_attempts=7, num_days_valid=32, debug_prn=True
)
No change necessary -- True is the same as True
No change necessary -- 7 is the same as 7
No change necessary -- 32 is the same as 32
MFA_Config(is_multifactor_required=True, max_code_attempts=7, num_days_valid=32)