Skip to content

Commit 5f91c76

Browse files
committed
registry: deprecate RepositoryInfo.Class
The Class field was added in a12b466 because Docker Hub registry required a special scope to be set for pulling plugins; HTTP/1.1 401 Unauthorized ... Www-Authenticate: Bearer realm="https://auth.docker.io/token",service="registry.docker.io",scope="repository(plugin):vieux/sshfs:pull",error="insufficient_scope" This is no longer a requirement, and the field is no longer set. This patch deprecates the field and removes its use. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent bff7444 commit 5f91c76

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

distribution/registry.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ func newRepository(
123123
Scopes: []auth.Scope{auth.RepositoryScope{
124124
Repository: repoName,
125125
Actions: actions,
126-
Class: repoInfo.Class,
127126
}},
128127
ClientID: registry.AuthClientID,
129128
})

registry/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,7 @@ type RepositoryInfo struct {
3737
Official bool
3838
// Class represents the class of the repository, such as "plugin"
3939
// or "image".
40+
//
41+
// Deprecated: this field is no longer used, and will be removed in the next release.
4042
Class string
4143
}

0 commit comments

Comments
 (0)