Просмотр исходного кода

add master_key check on JWT refresh

Anish Mukherjee 2 лет назад
Родитель
Сommit
9f2def1808
1 измененных файлов с 1 добавлено и 1 удалено
  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