Skip to content

Commit

Permalink
Generate token options with each scope as a separate string.
Browse files Browse the repository at this point in the history
Currently scopes added to token options are added with all scopes included in space delimited string. This changes it so that each scope is added to the string slice as a separate string. This seems to be the desire behavior based on the fact that a string slice is used and the usage of this function in github.com/moby/buildkit.

Signed-off-by: Jacob MacElroy <jacob@okteto.com>
  • Loading branch information
Jacob MacElroy committed Oct 26, 2021
1 parent 0d0fb68 commit 9b4a6f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion remotes/docker/auth/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func GenerateTokenOptions(ctx context.Context, host, username, secret string, c

scope, ok := c.Parameters["scope"]
if ok {
to.Scopes = append(to.Scopes, scope)
to.Scopes = append(to.Scopes, strings.Split(scope, " ")...)
} else {
log.G(ctx).WithField("host", host).Debug("no scope specified for token auth challenge")
}
Expand Down

0 comments on commit 9b4a6f1

Please sign in to comment.