Skip to content

Commit

Permalink
feat: send a user agent in requests to fga servers (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhamzeh committed Jul 6, 2023
2 parents 681c738 + 1d2c0b1 commit 9b7db29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/fga/fga.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"github.com/openfga/go-sdk/credentials"
)

const userAgent = "openfga-cli/0.0.1"

type ClientConfig struct {
ServerURL string `json:"server_url,omitempty"`
StoreID string `json:"store_id,omitempty"`
Expand Down Expand Up @@ -58,6 +60,7 @@ func (c ClientConfig) getClientConfig() (*client.ClientConfiguration, error) {
StoreId: c.StoreID,
AuthorizationModelId: openfga.PtrString(c.AuthorizationModelID),
Credentials: c.getCredentials(),
UserAgent: userAgent,
}, nil
}

Expand Down

0 comments on commit 9b7db29

Please sign in to comment.