Disable auth gracefully without impacting existing watchers.

Signed-off-by: Lan Liang <gcslyp@gmail.com>
This commit is contained in:
Lan Liang
2023-07-14 10:22:25 +08:00
parent d4f779a643
commit 960cd26bef
3 changed files with 50 additions and 1 deletions

View File

@@ -264,6 +264,7 @@ func (c *Client) getToken(ctx context.Context) error {
resp, err := c.Auth.Authenticate(ctx, c.Username, c.Password)
if err != nil {
if err == rpctypes.ErrAuthNotEnabled {
c.authTokenBundle.UpdateAuthToken("")
return nil
}
return err