mirror of
https://github.com/helm/helm.git
synced 2026-08-06 08:01:19 +00:00
Merge pull request #10558 from sabre1041/bearer-token-oci
Management of bearer tokens for tag listing
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user