Skip to content

Commit 28e6572

Browse files
[TASKSCLOUD-689] - Deployed new 23.02 version.
1 parent e7e54c0 commit 28e6572

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

api/client.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,13 @@ func (c *APIClient) NewContextWithToken(ctx context.Context) (ctxWithToken conte
232232
ctx = context.Background()
233233
}
234234

235-
tokenUrl, _ := url.Parse(c.cfg.BaseUrl)
236-
tokenUrl.Path = "/connect/token"
235+
var tokenUrl *url.URL
236+
if c.cfg.AuthUrl != "" {
237+
tokenUrl, _ = url.Parse(c.cfg.AuthUrl)
238+
} else {
239+
tokenUrl, _ = url.Parse(c.cfg.BaseUrl)
240+
tokenUrl.Path = "/connect/token"
241+
}
237242

238243
response, err := http.PostForm(tokenUrl.String(), url.Values{
239244
"grant_type": {"client_credentials"},

api/models/configuration.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ type Configuration struct {
7575
BaseUrl string `json:"BaseUrl,omitempty"`
7676
AppKey string `json:"AppKey"`
7777
AppSid string `json:"AppSid"`
78+
AuthUrl string `json:"AuthUrl,omitempty"`
7879
DebugMode bool `json:"DebugMode,omitempty"`
7980
DefaultHeader map[string]string `json:"DefaultHeader,omitempty"`
8081
HttpClient *http.Client
@@ -91,7 +92,7 @@ func NewConfiguration(configFilePath string) (pConfig *Configuration, err error)
9192
cfg := Configuration{
9293
BaseUrl: "https://api.aspose.cloud",
9394
DebugMode: false,
94-
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "22.12"},
95+
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "23.02"},
9596
}
9697
err = json.Unmarshal(data, &cfg)
9798

0 commit comments

Comments
 (0)