Merge pull request #10558 from sabre1041/bearer-token-oci

Management of bearer tokens for tag listing
pull/10612/head
Josh Dolitsky 3 years ago committed by GitHub
commit 59dbda915f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -112,6 +112,13 @@ func NewClient(options ...ClientOption) (*Client, error) {
return registryauth.EmptyCredential, errors.New("unable to retrieve credentials")
}
// A blank returned username and password value is a bearer token
if username == "" && password != "" {
return registryauth.Credential{
RefreshToken: password,
}, nil
}
return registryauth.Credential{
Username: username,
Password: password,

Loading…
Cancel
Save