How to use the tokendito.settings.okta_username 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 / helpers.py View on Github external
def set_okta_username():
    """Set okta username in a constant settings variable.

    :return: okta_username

    """
    logging.debug("Set okta username in a constant settings variable.")

    if settings.okta_username == '':
        okta_username = input('Username: ')
        setattr(settings, 'okta_username', to_unicode(okta_username))
        logging.debug('username set to {} interactively'.format(
            settings.okta_username))

    return settings.okta_username
github dowjones / tokendito / tokendito / helpers.py View on Github external
def set_okta_username():
    """Set okta username in a constant settings variable.

    :return: okta_username

    """
    logging.debug("Set okta username in a constant settings variable.")

    if settings.okta_username == '':
        okta_username = input('Username: ')
        setattr(settings, 'okta_username', to_unicode(okta_username))
        logging.debug('username set to {} interactively'.format(
            settings.okta_username))

    return settings.okta_username