Browse Source

add master_key check on JWT refresh

Anish Mukherjee 2 years ago
parent
commit
9f2def1808
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cli/functions/http_client.go

+ 1 - 1
cli/functions/http_client.go

@@ -74,7 +74,7 @@ retry:
 		log.Fatalf("Client error making http request: %s", err)
 	}
 	// refresh JWT token
-	if res.StatusCode == http.StatusUnauthorized && !retried {
+	if res.StatusCode == http.StatusUnauthorized && !retried && ctx.MasterKey == "" {
 		req.Header.Set("Authorization", "Bearer "+getAuthToken(ctx, true))
 		retried = true
 		goto retry