databricks-cli/cmd/auth
hectorcast-db 77101c9b85
Use profile information when getting a token using the CLI ()
## Changes
Use stored profile information when the user provides the profile flag
when using the `databricks auth token` command.

## Tests
Run the command with and without the profile flag

```
./cli auth token
Databricks Host: https://e2-dogfood.staging.cloud.databricks.com/
{
  "access_token": "****",
  "token_type": "Bearer",
  "expiry": "2023-10-10T14:24:11.85617+02:00"
}%

./cli auth token --profile DEFAULT
{
  "access_token": "*****",
  "token_type": "Bearer",
  "expiry": "2023-10-10T14:24:11.85617+02:00"
}%

./cli auth token https://e2-dogfood.staging.cloud.databricks.com/
{
  "access_token": "*****",
  "token_type": "Bearer",
  "expiry": "2023-10-11T09:24:55.046029+02:00"
}%   

./cli auth token --profile DEFAULT https://e2-dogfood.staging.cloud.databricks.com/
Error: providing both a profile and a host parameters is not supported
```
2023-10-11 11:12:18 +00:00
..
README.md Rename bricks -> databricks () 2023-05-16 18:35:39 +02:00
auth.go Remove dependency on global state for remaining commands () 2023-07-27 10:03:08 +00:00
env.go Always resolve .databrickscfg file () 2023-08-14 12:45:08 +00:00
login.go Use profile information when getting a token using the CLI () 2023-10-11 11:12:18 +00:00
profiles.go Always resolve .databrickscfg file () 2023-08-14 12:45:08 +00:00
token.go Use profile information when getting a token using the CLI () 2023-10-11 11:12:18 +00:00

README.md

Auth challenge (happy path)

Simplified description of PKCE implementation:

Token refresh (happy path)