databricks-cli/libs/auth
shreyas-goenka 1225fc0c13
Fix host resolution order in `auth login` ()
## Changes
The `auth login` command today prefers a host URL specified in a profile
before selecting the one explicitly provided by a user as a command line
argument.

This PR fixes this bug and refactors the code to make it more linear and
easy to read. Note that the same issue exists in the `auth token`
command and is fixed here as well.

## Tests
Unit tests, and manual testing.
2024-08-14 13:01:00 +00:00
..
cache Improve token refresh flow () 2024-05-16 10:22:09 +00:00
callback.go Added `bricks auth login` and `bricks auth token` () 2023-01-06 16:15:57 +01:00
oauth.go Fix host resolution order in `auth login` () 2024-08-14 13:01:00 +00:00
oauth_test.go Propagate correct `User-Agent` for CLI () 2024-03-11 22:24:23 +00:00
page.tmpl Fix link to workspace after AWS OAuth login () 2023-03-08 11:56:46 +01:00
service_principal.go Use UserName field to identify if service principal is used () 2024-03-25 11:32:45 +00:00
service_principal_test.go Fix IsServicePrincipal() only working for workspace admins () 2023-09-05 11:20:55 +00:00
user.go Add short_name helper function to bundle init templates () 2024-02-01 16:46:07 +00:00
user_test.go Fixed job name normalisation for bundle generate () 2024-07-17 12:33:49 +00:00