mirror of
https://github.com/helm/helm.git
synced 2026-08-08 00:51:55 +00:00
Management of bearer tokens for tag listing
Signed-off-by: Andrew Block <andy.block@gmail.com>
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