DockerCLI/vendor
Laura Brehm fcfdd7b91f
auth: add support for oauth device-code login
This commit adds support for the oauth [device-code](https://auth0.com/docs/get-started/authentication-and-authorization-flow/device-authorization-flow)
login flow when authenticating against the official registry.

This is achieved by adding `cli/internal/oauth`, which contains code to manage
interacting with the Docker OAuth tenant (`login.docker.com`), including launching
the device-code flow, refreshing access using the refresh-token, and logging out.

The `OAuthManager` introduced here is also made available through the `command.Cli`
interface method `OAuthManager()`.

In order to maintain compatibility with any clients manually accessing
the credentials through `~/.docker/config.json` or via credential
helpers, the added `OAuthManager` uses the retrieved access token to
automatically generate a PAT with Hub, and store that in the
credentials.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-08-14 19:48:04 +01:00
..
dario.cat/mergo rename and update mergo module 2023-06-26 22:25:52 +02:00
github.com auth: add support for oauth device-code login 2024-08-14 19:48:04 +01:00
go.etcd.io/etcd/raft/v3 vendor: github.com/docker/swarmkit 616e8db4c3b0 2022-03-16 15:39:52 +01:00
go.opentelemetry.io cli: add otel sdk tracing and metric providers to the core cli 2024-03-25 11:11:34 -05:00
golang.org/x vendor: golang.org/x/sys v0.22.0 2024-07-25 14:53:35 +02:00
google.golang.org cli: add otel sdk tracing and metric providers to the core cli 2024-03-25 11:11:34 -05:00
gopkg.in/yaml.v2 vendor dependencies with go1.17 2022-03-26 19:48:14 +01:00
gotest.tools/v3 vendor: gotest.tools/v3 v3.5.1 2023-10-20 17:39:10 +02:00
tags.cncf.io/container-device-interface Update container-device-interface to v0.6.2 2023-11-04 01:18:41 +01:00
modules.txt auth: add support for oauth device-code login 2024-08-14 19:48:04 +01:00