cli
cli copied to clipboard
🚧 Add support for OAuth device-code login 🚧
- What I did
WIP PR for discussion that adds support for the device-code flow OAuth login, when authenticating against the official registry.
I'll follow up with another PR to explore implementing this at the credential store layer/using a new credential store.
- How I did it
Added cli/internal/oauth
, which includes a new OAuthManager
that is capable of fulfilling a device-code flow against the official registry.
Fetching credentials remains the same, as the returned access token can be transparently used in place of the password when authenticating.
Login and logout flows now defer to OAuthManager
when running against the official registry.
- How to verify it
Run docker login
, and check your credentials store to find the stored access tokens. Attempt to do an operation which requires authentication (such as pushing an image to your repo) and verify it works.
- Description for the changelog
Added support for the device-code flow OAuth login, when authenticating against the official registry.
- A picture of a cute animal (not mandatory but encouraged)