From 429d0b7c83986417afd8dd93ab9ca538ea04dcfe Mon Sep 17 00:00:00 2001 From: Pagan Gazzard Date: Fri, 18 Oct 2024 16:19:45 +0100 Subject: [PATCH 1/2] Create pinejs client using `NewClientWithToken` Change-type: patch --- auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.go b/auth.go index 498caa8..520ecd6 100644 --- a/auth.go +++ b/auth.go @@ -49,7 +49,7 @@ func newAuthHandler(baseURL, apiKey string, verbosity int) authHandler { func (a *authHandler) getUserKeys(username string) ([]gossh.PublicKey, error) { url := fmt.Sprintf("%s/%s", a.baseURL, "v5") - client := pinejs.NewClient(url, a.apiKey) + client := pinejs.NewClientWithToken(url, a.apiKey) users := make([]map[string]interface{}, 1) users[0] = make(map[string]interface{}) From b91a728082c82ea6209a921cb3bd0c3602f7ca64 Mon Sep 17 00:00:00 2001 From: Pagan Gazzard Date: Fri, 18 Oct 2024 16:20:04 +0100 Subject: [PATCH 2/2] Update from v5 to v7 api usage Change-type: patch --- auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.go b/auth.go index 520ecd6..cb7ef94 100644 --- a/auth.go +++ b/auth.go @@ -48,7 +48,7 @@ func newAuthHandler(baseURL, apiKey string, verbosity int) authHandler { } func (a *authHandler) getUserKeys(username string) ([]gossh.PublicKey, error) { - url := fmt.Sprintf("%s/%s", a.baseURL, "v5") + url := fmt.Sprintf("%s/%s", a.baseURL, "v7") client := pinejs.NewClientWithToken(url, a.apiKey) users := make([]map[string]interface{}, 1)