upbound / up

The @upbound CLI
Apache License 2.0
49 stars 42 forks source link

Merge `web-login` into `login` #525

Closed jastang closed 1 month ago

jastang commented 1 month ago

Description of your changes

Unify up web-login and up login. The default behaviour will be the old web-login unless flags are explicitly supplied.

CI systems for pushing Crossplane packages to registries will rely on docker login instead.

I have:

How has this code been tested

➜  darwin_arm64 ./up login -h
Usage: up login

Login to Upbound. Will attempt to launch a web browser by default. Use auth flags for automations.

Flags:
  -h, --help                         Show context-sensitive help.
      --format="default"             Format for get/list commands. Can be: json, yaml, default
  -q, --quiet                        Suppress all output.
      --pretty                       Pretty print output.

  -u, --username=STRING              Username used to execute command ($UP_USER).
  -p, --password=STRING              Password for specified user. '-' to read from stdin ($UP_PASSWORD).
      --domain=https://upbound.io    Root Upbound domain ($UP_DOMAIN).
      --profile=STRING               Profile used to execute command ($UP_PROFILE).
  -a, --account=STRING               Account used to execute command ($UP_ACCOUNT).
      --insecure-skip-tls-verify     [INSECURE] Skip verifying TLS certificates ($UP_INSECURE_SKIP_TLS_VERIFY).
  -d, --debug=INT                    [INSECURE] Run with debug logging. Repeat to increase verbosity. Output might contain confidential data like tokens
                                     ($UP_DEBUG).

with explicit flags:

➜  darwin_arm64 ./up login -u jasont
Password: 
jasont logged in
./up login -u jasont -p ********
jasont logged in

Verified up login will attempt to launch a browser and produce a TOTP QR code otherwise.