You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
token: An opaque Bearer token that clients should supply to subsequent requests in the Authorization header.
access_token: For compatibility with OAuth 2.0, we will also accept token under the name access_token. At least one of these fields must be specified, but both may also appear (for compatibility with older clients). When both are specified, they should be equivalent; if they differ the client's choice is undefined.
diff --git a/api/v1/registry/client/auth/bearer/bearer.go b/api/v1/registry/client/auth/bearer/bearer.go
index 3a99170..fc1ea5b 100644
--- a/api/v1/registry/client/auth/bearer/bearer.go+++ b/api/v1/registry/client/auth/bearer/bearer.go@@ -9,7 +9,8 @@ import (
// Token implementation for Bearer authentication
type Token struct {
- T string `json:"token"`+ T string `json:"token,omitempty"`+ A string `json:"access_token,omitempty"`
E int `json:"expires_in"`
}
@@ -20,7 +21,10 @@ func (tk Token) Method() string {
// String form of Bearer token
func (tk Token) String() string {
- return tk.T+ if tk.A == "" {+ return tk.T+ }+ return tk.A
}
via https://docs.docker.com/registry/spec/auth/token/#requesting-a-token
bit dirty but it does the trick @ivanilves
The text was updated successfully, but these errors were encountered: