def uri(ctx, uri, touch, force):
    """
    Add a new credential from URI.

    Use a URI to add a new credential to your YubiKey.
    """

    if not uri:
        while True:
            uri = click.prompt('Enter an OATH URI', err=True)
            try:
                uri = CredentialData.from_uri(uri)
                break
            except Exception as e:
                click.echo(e)

    ensure_validated(ctx)
    data = uri

    # Steam is a special case where we allow the otpauth
    # URI to contain a 'digits' value of '5'.
    if data.digits == 5 and data.issuer == 'Steam':
        data.digits = 6

    data.touch = touch

    _add_cred(ctx, data, force=force)
def uri ( ctx , uri , touch , force ) : if not uri : while True : uri = click . prompt ( 'Enter an OATH URI' , err = True ) try : uri = CredentialData . from_uri ( uri ) break except Exception as e : click . echo ( e ) ensure_validated ( ctx ) data = uri if data . digits == 5 and data . issuer == 'Steam' : data . digits = 6 data . touch = touch _add_cred ( ctx , data , force = force )
Add a new credential from URI.

    Use a URI to add a new credential to your YubiKey.