camallo / dkregistry-rs

A pure-Rust asynchronous library for Docker Registry API v2
Apache License 2.0
62 stars 39 forks source link

Authenticating against Azure Container Registry (ACR) fails #262

Open ThorstenHans opened 7 months ago

ThorstenHans commented 7 months ago

The current implementation does not work with Azure Container Registry (ACR). As the REST specification outlines, Microsoft returns the access token using the access_token field instead of a field called token.

Ref: https://learn.microsoft.com/en-us/rest/api/containerregistry/access-tokens/get-from-login?view=rest-containerregistry-2019-08-15&tabs=HTTP#get-access-token-with-username-and-password

Allowing deserialization from both fields would allow authentication with Azure Container Registry as well.