How to use the tokendito.helpers.get_input function in tokendito

To help you get started, we’ve selected a few tokendito 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 dowjones / tokendito / tokendito / duo_helpers.py View on Github external
def set_passcode(mfa_option):
    """Set totp passcode.

    If the user has selected the passcode option, collect their TOTP.

    :param mfa_option: selected factor
    :return passcode: passcode value from user
    """
    passcode = None
    if mfa_option["factor"].lower() == "passcode":
        print('Type your TOTP and press Enter')
        passcode = helpers.get_input()
    return passcode