From 535bca5a7a03d9e869c5c0fe548d8ea520393738 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 9 Sep 2020 10:33:23 -0400 Subject: [PATCH] Make Authenticate less misleading Because clients clone in the API now, setting the token on the authtokens client may mislead the user into thinking it's setting it on the base client. Remove that set call. --- api/authmethods/authenticate.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/api/authmethods/authenticate.go b/api/authmethods/authenticate.go index 96a7f778c5..fd5cb702c2 100644 --- a/api/authmethods/authenticate.go +++ b/api/authmethods/authenticate.go @@ -35,9 +35,5 @@ func (c *Client) Authenticate(ctx context.Context, authMethodId string, credenti return nil, nil, fmt.Errorf("error decoding Authenticate response: %w", err) } - if target.Token != "" { - c.client.SetToken(target.Token) - } - return target, apiErr, nil }