Add new resources, extend fields in config

This commit is contained in:
stSolo
2022-10-06 12:53:21 +03:00
parent 5fd450382c
commit 8712561853
39 changed files with 1784 additions and 3 deletions

View File

@@ -17,6 +17,12 @@ func NewHttpClient(cfg config.Config) *http.Client {
},
}
var expiredTime time.Time
if cfg.Token != "" {
expiredTime = time.Now().AddDate(0, 0, 1)
}
return &http.Client{
Transport: &transport{
base: transCfg,
@@ -24,6 +30,8 @@ func NewHttpClient(cfg config.Config) *http.Client {
clientID: cfg.AppID,
clientSecret: cfg.AppSecret,
SSOURL: cfg.SSOURL,
token: cfg.Token,
expiryTime: expiredTime,
//TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},