Skip to content

Commit 0fa91b1

Browse files
authored
change auth
1 parent babc3e3 commit 0fa91b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

port/cli/client.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ func New(baseURL string, opts ...Option) (*PortClient, error) {
4444
func (c *PortClient) Authenticate(ctx context.Context, clientID, clientSecret string) (string, error) {
4545
url := "v1/auth/access_token"
4646
resp, err := c.Client.R().
47+
SetBody(map[string]interface{}{
48+
"clientId": clientID,
49+
"clientSecret": clientSecret,
50+
}).
4751
SetContext(ctx).
48-
SetQueryParam("client_id", clientID).
49-
SetQueryParam("client_secret", clientSecret).
50-
Get(url)
52+
Post(url)
5153
if err != nil {
5254
return "", err
5355
}

0 commit comments

Comments
 (0)