Skip to content

Commit

Permalink
change auth
Browse files Browse the repository at this point in the history
  • Loading branch information
amitb777 authored Sep 6, 2022
1 parent babc3e3 commit 0fa91b1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions port/cli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ func New(baseURL string, opts ...Option) (*PortClient, error) {
func (c *PortClient) Authenticate(ctx context.Context, clientID, clientSecret string) (string, error) {
url := "v1/auth/access_token"
resp, err := c.Client.R().
SetBody(map[string]interface{}{
"clientId": clientID,
"clientSecret": clientSecret,
}).
SetContext(ctx).
SetQueryParam("client_id", clientID).
SetQueryParam("client_secret", clientSecret).
Get(url)
Post(url)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 0fa91b1

Please sign in to comment.